[PATCH] D142888: [compiler-rt] Fix building GWPASAN on ARM

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 01:18:16 PST 2023


phosek added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/CMakeLists.txt:44
+set(SCUDO_UNWINDLIB_NONE CXX_SUPPORTS_UNWINDLIB_NONE_FLAG)
+set(SCUDO_LINK_LIBS)
+
----------------
This is not necessary, in CMake you don't need to define variables beforehand.


================
Comment at: compiler-rt/lib/scudo/standalone/CMakeLists.txt:49-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.
+elseif(COMPILER_RT_HAS_GWP_ASAN AND "${LLVM_NATIVE_ARCH}" STREQUAL "ARM")
----------------
The comment should be inside the `elseif` branch.


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