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

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 01:23:20 PST 2023


DavidSpickett added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/CMakeLists.txt:48
+  list(APPEND SCUDO_LINK_LIBS ${COMPILER_RT_UNWINDER_LINK_LIBS} dl)
+
+# On ARM, we must link against an unwind lib when GWPAsan is used, otherwise
----------------
I would remove the blank line here, then put the ARM related comment after the elseif line. So it's easier to see that this is an if/elseif construct.


================
Comment at: compiler-rt/lib/scudo/standalone/CMakeLists.txt:61
+  else()
+    set(SCUDO_UNWINDLIB_NONE OFF)
+  endif()
----------------
Add a comment `# Use the system unwind library.`, assuming that's what this does.


================
Comment at: compiler-rt/lib/scudo/standalone/CMakeLists.txt:65
+
+append_list_if(SCUDO_UNWINDLIB_NONE --unwindlib=none SCUDO_LINK_FLAGS)
 
----------------
Say we are on AArch64, COMPILER_RT_USE_LLVM_UNWINDER is set ON. That means we're using llvm's unwinder.

Then we check if SCUDO_UNWINDLIB_NONE is ON and let's say it is, what effect does `--unwindlib=none` have? Does that flag just prevent another unwind library being linked on top of the one that COMPILER_RT_USE_LLVM_UNWINDER already added?


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