You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows ARM64 (MSYS2 CLANGARM64): build fails because __builtin_setjmp/longjmp are not supported on ARM64 #6637
On Windows ARM64 with MSYS2 CLANGARM64, the current condition in mruby/throw.h selects the __builtin_setjmp/longjmp path.
In this environment, mruby fails to compile with:
$ rake -m test:run:serial
...
C:/a/mruby/mruby/mrbgems/mruby-compiler/core/codegen.c:6148:3: error: __builtin_setjmp is not supported for the current target
6148 | MRB_TRY(mrb->jmp) {
| ^~~~~~~~~~~~~~~~~
C:/a/mruby/mruby/include/mruby/throw.h:44:26: note: expanded from macro 'MRB_TRY'
44 | #define MRB_TRY(buf) if (MRB_SETJMP((buf)->impl) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~
C:/a/mruby/mruby/include/mruby/throw.h:37:20: note: expanded from macro 'MRB_SETJMP'
37 | #define MRB_SETJMP __builtin_setjmp
| ^
2 warnings and 2 errors generated.
...
There’s a small patch on the MSYS2 side that excludes ARM64 from the MinGW builtin branch by checking _M_ARM64.
Would adopting the same approach here make sense?
I applied the above patch and re-ran CI on my fork. The __builtin_* selection issue appears resolved, but the ARM64 job is still failing for a different reason.
Activity
matz commentedon Oct 8, 2025
OK, if it's possible, send me PR please.
throw.h: exclude arm64 from mingw64 builtin setjmp/longjmp; fix mruby…
ci msys2: Add mruby patch for Windows ARM64 support
ci msys2: Add mruby patch for Windows ARM64 support
ci msys2: Add mruby patch for Windows ARM64 support (#2648)
throw.h: use setjmp/longjmp with clang on MinGW