[PATCH] D142888: [compiler-rt] Fix building GWPASAN on ARM
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 26 12:21:31 PST 2023
phosek added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/CMakeLists.txt:48-55
+ # On ARM, we must link against an unwind lib when GWPAsan is used, otherwise
+ # we get undefined references to __aeabi_unwind_cpp_pr* symbols.
+ # This is because object files compiled with -funwind-tables end up referencing
+ # these symbols on ARM, while on other architectures, such as x86_64 and
+ # AArch64, only the .eh_frame section is added, but no references to an unwind
+ # library are made.
+ if(LIBUNWIND_ENABLE_SHARED OR LIBUNWIND_ENABLE_STATIC)
----------------
Could we use libgcc in this case (and report an error if it's unavailable)? We already have a variable to control whether to use LLVM libunwind or libgcc. This block silently picks up libunwind even when `COMPILER_RT_USE_LLVM_UNWINDER` isn't set which is unexpected.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142888/new/
https://reviews.llvm.org/D142888
More information about the llvm-commits
mailing list