Skip to content

Commit 9096999

Browse files
authored
[SjLj] __USING_WASM_SJLJ__ -> __WASM_SJLJ__ (#21971)
In line with #21970, this changes `__USING_WASM_SJLJ__` to `__WASM_SJLJ__`. We don't define this in Clang now (which we can maybe consider, but given that Clang doesn't have dedicated flags for SjLj and there don't seem to be other platforms doing similar things), but given that the affected files currently are only in Emscripten, I think we can safely change this.
1 parent 32e1daf commit 9096999

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

system/lib/compiler-rt/emscripten_setjmp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "emscripten_internal.h"
1515

16-
#ifdef __USING_WASM_SJLJ__
16+
#ifdef __WASM_SJLJ__
1717
struct __WasmLongjmpArgs {
1818
void *env;
1919
int val;
@@ -25,7 +25,7 @@ struct __WasmLongjmpArgs {
2525
struct jmp_buf_impl {
2626
void* func_invocation_id;
2727
uint32_t label;
28-
#ifdef __USING_WASM_SJLJ__
28+
#ifdef __WASM_SJLJ__
2929
struct __WasmLongjmpArgs arg;
3030
#endif
3131
};
@@ -48,7 +48,7 @@ uint32_t __wasm_setjmp_test(void* env, void* func_invocation_id) {
4848
return 0;
4949
}
5050

51-
#ifdef __USING_WASM_SJLJ__
51+
#ifdef __WASM_SJLJ__
5252
// llvm uses `1` for the __c_longjmp tag.
5353
// See https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h
5454
#define C_LONGJMP 1

tools/system_libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ def get_cflags(self):
852852
# EH/SjLj, so we should reverse it.
853853
cflags += ['-sSUPPORT_LONGJMP=wasm',
854854
'-sDISABLE_EXCEPTION_THROWING',
855-
'-D__USING_WASM_SJLJ__']
855+
'-D__WASM_SJLJ__']
856856
return cflags
857857

858858
def get_base_name(self):

0 commit comments

Comments
 (0)