-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Use builtin __wasm_exception_handling__ macro. NFC #25285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1640,8 +1640,6 @@ def get_cflags(self): | |||
# The code used to interpret exceptions during terminate | |||
# is not compatible with emscripten exceptions. | |||
cflags.append('-DLIBCXXABI_SILENT_TERMINATE') | |||
elif self.eh_mode == Exceptions.WASM_LEGACY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some reason why this one is only comparing with WASM_LEGACY
and not WASM
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I forgot to update it. But anyway this is not necessary because we define it in the clang preprocessor: https://github.com/llvm/llvm-project/blob/82acc31fd4b26723b61dae76da120c0c649d0b97/clang/lib/Frontend/InitPreprocessor.cpp#L1034-L1035
So if we are to change the name we have to update this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you want to change it? To be consistent with __wasm__
?
I don't mind changing it, but this is upstreamed, so we have to change it there as well. The instances are
aheejin@aheejin:~/llvm-git/clang$ grep __WASM_EXCEPTIONS__ * -R
lib/Frontend/InitPreprocessor.cpp: Builder.defineMacro("__WASM_EXCEPTIONS__");
test/CodeGenCXX/wasm-eh.cpp:// PREPROCESSOR: #define __WASM_EXCEPTIONS__ 1
aheejin@aheejin:~/llvm-git/libcxxabi$ grep __WASM_EXCEPTIONS__ * -R
src/cxa_personality.cpp:#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#else // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS_
src/cxa_personality.cpp:#endif // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS_
src/cxa_personality.cpp:#if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#else // !__USING_SJLJ_EXCEPTIONS__ && !__WASM_EXCEPTIONS__
src/cxa_personality.cpp:#endif // !__USING_SJLJ_EXCEPTIONS__ && !__WASM_EXCEPTIONS__
src/cxa_personality.cpp:#if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#else // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS_
src/cxa_personality.cpp:#endif // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS_
src/cxa_personality.cpp:#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#else // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS_
src/cxa_personality.cpp:#endif // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS_
src/cxa_personality.cpp:#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__)
src/cxa_personality.cpp:#endif // !__USING_SJLJ_EXCEPTIONS__ && !__WASM_EXCEPTIONS__
src/cxa_personality.cpp:#ifdef __WASM_EXCEPTIONS__
src/cxa_personality.cpp:#ifdef __WASM_EXCEPTIONS__
aheejin@aheejin:~/llvm-git/libunwind$ grep __WASM_EXCEPTIONS__ * -R
src/Unwind-wasm.c:#ifdef __WASM_EXCEPTIONS__
src/Unwind-wasm.c:#endif // defined(__WASM_EXCEPTIONS__)
Landing this before changing https://github.com/llvm/llvm-project/blob/82acc31fd4b26723b61dae76da120c0c649d0b97/clang/lib/Frontend/InitPreprocessor.cpp#L1034-L1035 will break the waterfall.
@@ -1640,8 +1640,6 @@ def get_cflags(self): | |||
# The code used to interpret exceptions during terminate | |||
# is not compatible with emscripten exceptions. | |||
cflags.append('-DLIBCXXABI_SILENT_TERMINATE') | |||
elif self.eh_mode == Exceptions.WASM_LEGACY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I forgot to update it. But anyway this is not necessary because we define it in the clang preprocessor: https://github.com/llvm/llvm-project/blob/82acc31fd4b26723b61dae76da120c0c649d0b97/clang/lib/Frontend/InitPreprocessor.cpp#L1034-L1035
So if we are to change the name we have to update this too.
Oh, if |
No description provided.