Skip to content

Commit

Permalink
Merge #2585
Browse files Browse the repository at this point in the history
2585: fix(compiler)-Use regular setjmp function for MinGW r=ptitSeb a=ptitSeb

Fix build issue with MinGW-64 toolchain.

Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
  • Loading branch information
bors[bot] and ptitSeb authored Sep 27, 2021
2 parents dc7e8b1 + e4c64fc commit f566c30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/vm/src/trap/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
// it's fine most of the time, but not for JIT'd code that may not respect stack ordring
// Using a special setjmp here, with NULL as second parameter to disable that behaviour
// and have a regular simple setjmp/longjmp sequence
#ifdef __MINGW32__
// MINGW64 doesn't expose the __intrinsic_setjmp function, but a similar _setjump instead
#define platform_setjmp(buf) _setjmp(buf, NULL)
#else
#define platform_setjmp(buf) __intrinsic_setjmp(buf, NULL)
#endif
#define platform_longjmp(buf, arg) longjmp(buf, arg)
#define platform_jmp_buf jmp_buf
#elif defined(CFG_TARGET_OS_MACOS)
Expand Down

0 comments on commit f566c30

Please sign in to comment.