[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
aheejin wrote: Hmm, yes, I thought we didn't build `libunwind.cpp` because the code next to the part I excluded was wrapped with `#ifdef __APPLE__`: https://github.com/llvm/llvm-project/blob/a8ac930b99d93b2a539ada7e566993d148899144/libunwind/src/libunwind.cpp#L352-L432 But yeah then we build the `logAPI` part: https://github.com/llvm/llvm-project/blob/a8ac930b99d93b2a539ada7e566993d148899144/libunwind/src/libunwind.cpp#L434-L474 Will fix the message accordingly. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
arichardson wrote: > > The commit message is slightly misleading, it appears there are some parts > > of the file that are actually used? > > As the commit message says, we only use > https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c > and not libunwind.cpp. We don't use any parts of libunwind.cpp. Do you have > any suggestions on how to improve the message to make it clearer? Looking at the file, there is some code that will still be compiled for wasm (at least for debug builds). If those functions are also not used for wasm they should be ifdef'd out as well? Commit message could be something like `Omit unused parts of libunwind.cpp for WASM`. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
aheejin wrote: > The commit message is slightly misleading, it appears there are some parts of > the file that are actually used? As the commit message says, we only use https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c and not libunwind.cpp. We don't use any parts of libunwind.cpp. Do you have any suggestions on how to improve the message to make it clearer? https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
arichardson wrote: > The commit message is slightly misleading, it appears there are some parts of > the file that are actually used? Other than this, the change looks good to me. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
https://github.com/arichardson requested changes to this pull request. The commit message is slightly misleading, it appears there are some parts of the file that are actually used? https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
https://github.com/ldionne approved this pull request. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Heejin Ahn (aheejin) Changes Wasm doesn't use that file; Wasm does not allow access of system registers and those functionalities are provided from the VM. Wasm only uses https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c, which implements a few interface functions. --- Full diff: https://github.com/llvm/llvm-project/pull/73196.diff 1 Files Affected: - (modified) libunwind/src/libunwind.cpp (+3-2) ``diff diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp index 1bd18659b7860c0..cd610377b63de8d 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp @@ -26,7 +26,7 @@ #include #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) || !defined(__USING_WASM_EXCEPTIONS__) #include "AddressSpace.hpp" #include "UnwindCursor.hpp" @@ -347,7 +347,8 @@ void __unw_remove_dynamic_eh_frame_section(unw_word_t eh_frame_start) { } #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) -#endif // !defined(__USING_SJLJ_EXCEPTIONS__) +#endif // !defined(__USING_SJLJ_EXCEPTIONS__) || + // !defined(__USING_WASM_EXCEPTIONS__) #ifdef __APPLE__ `` https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/73196 Wasm doesn't use that file; Wasm does not allow access of system registers and those functionalities are provided from the VM. Wasm only uses https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c, which implements a few interface functions. >From f26f6ec29e6ce735696b1aeb6b73e7221b008316 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Wed, 22 Nov 2023 18:18:19 -0800 Subject: [PATCH] [libunwind][WebAssembly] Don't build libunwind.cpp Wasm doesn't use that file; Wasm does not allow access of system registers and those functionalities are provided from the VM. Wasm only uses https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c, which implements a few interface functions. --- libunwind/src/libunwind.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp index 1bd18659b7860c0..cd610377b63de8d 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp @@ -26,7 +26,7 @@ #include #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) || !defined(__USING_WASM_EXCEPTIONS__) #include "AddressSpace.hpp" #include "UnwindCursor.hpp" @@ -347,7 +347,8 @@ void __unw_remove_dynamic_eh_frame_section(unw_word_t eh_frame_start) { } #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) -#endif // !defined(__USING_SJLJ_EXCEPTIONS__) +#endif // !defined(__USING_SJLJ_EXCEPTIONS__) || + // !defined(__USING_WASM_EXCEPTIONS__) #ifdef __APPLE__ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits