-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libunwind] Add Unwind-wasm.c to CMakeLists.txt #67770
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
This was missing when the file was added.
@llvm/pr-subscribers-libunwind ChangesThis was missing when the file was added. Full diff: https://github.com/llvm/llvm-project/pull/67770.diff 2 Files Affected:
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 452d988c3726b5e..abb019b88ebabd7 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -16,6 +16,7 @@ set(LIBUNWIND_C_SOURCES
UnwindLevel1.c
UnwindLevel1-gcc-ext.c
Unwind-sjlj.c
+ Unwind-wasm.c
)
set_source_files_properties(${LIBUNWIND_C_SOURCES}
PROPERTIES
diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c
index 35f2f9aeab08048..47c79b0d14d37b7 100644
--- a/libunwind/src/Unwind-wasm.c
+++ b/libunwind/src/Unwind-wasm.c
@@ -10,12 +10,13 @@
//
//===----------------------------------------------------------------------===//
+#ifdef __USING_WASM_EXCEPTIONS__
+
#include "config.h"
#include "unwind.h"
#include <stdbool.h>
#include <threads.h>
-#ifdef __USING_WASM_EXCEPTIONS__
_Unwind_Reason_Code __gxx_personality_wasm0(int version, _Unwind_Action actions,
uint64_t exceptionClass,
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Please reference the commit 058222b |
Done. |
Even though we don't use `CMakeLists.txt`, `Unwind-wasm.c` needs to be included in the file to be a part of libunwind. Reflecting changes of llvm/llvm-project#67770.
Even though we don't use `CMakeLists.txt`, `Unwind-wasm.c` needs to be included in the file to be a part of libunwind. Reflecting changes of llvm/llvm-project#67770. The order of headers and inserted newlines are to satisfy LLVM CI and clang-format. - `stdbool.h` should be before `config.h` because otherwise `bool` is not defined. But there should be a newline between them because otherwise clang-format will reorder them alphabetically - We need at least one header outside of `#ifdef __USING_WASM_EXCEPTIONS__` because LLVM CI complains there should be at least one declaration within a compilation unit, and `stdbool.h` doesn't have any, so we need another header outside - `threads.h` doesn't exist in other platforms. (It's in musl) So it needs to be in `#ifdef __USING_WASM_EXCEPTIONS__`
Will merge this; the remaining CI failures don't seem to related. |
Most of the changes seem irrelevant to us given that we only use `Uniwnd-wasm.cpp`. Changes related to Wasm are what I submitted upstream for adding the file to `CMakeLists.txt` and fixing some guards: llvm/llvm-project#67770 llvm/llvm-project#73196 llvm/llvm-project#78230
Most of the changes seem irrelevant to us given that we only use `Uniwnd-wasm.cpp`. Changes related to Wasm are what I submitted upstream for adding the file to `CMakeLists.txt` and fixing some guards: llvm/llvm-project#67770 llvm/llvm-project#73196 llvm/llvm-project#78230
This was missing when the file was added in 058222b.
Also reordered some headers to make LLVM CI and clang-format happy.