[PATCH] D142888: [compiler-rt] Fix scudo build on ARM

Leandro Lupori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 05:03:54 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf1f3dd64bfd2: [compiler-rt] Fix scudo build on ARM (authored by luporl).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142888/new/

https://reviews.llvm.org/D142888

Files:
  compiler-rt/lib/scudo/standalone/CMakeLists.txt


Index: compiler-rt/lib/scudo/standalone/CMakeLists.txt
===================================================================
--- compiler-rt/lib/scudo/standalone/CMakeLists.txt
+++ compiler-rt/lib/scudo/standalone/CMakeLists.txt
@@ -138,8 +138,19 @@
   )
 
 set(SCUDO_OBJECT_LIBS)
+set(SCUDO_LINK_LIBS)
 
 if (COMPILER_RT_HAS_GWP_ASAN)
+  if(COMPILER_RT_USE_LLVM_UNWINDER)
+    list(APPEND SCUDO_LINK_LIBS ${COMPILER_RT_UNWINDER_LINK_LIBS} dl)
+  elseif (COMPILER_RT_HAS_GCC_S_LIB)
+    list(APPEND SCUDO_LINK_LIBS gcc_s)
+  elseif (COMPILER_RT_HAS_GCC_LIB)
+    list(APPEND SCUDO_LINK_LIBS gcc)
+  else()
+    message(FATAL_ERROR "No suitable unwinder library")
+  endif()
+
   add_dependencies(scudo_standalone gwp_asan)
   list(APPEND SCUDO_OBJECT_LIBS
        RTGwpAsan RTGwpAsanBacktraceLibc RTGwpAsanSegvHandler
@@ -152,8 +163,6 @@
 
 endif()
 
-set(SCUDO_LINK_LIBS ${COMPILER_RT_UNWINDER_LINK_LIBS})
-
 if(COMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC)
   include_directories(${COMPILER_RT_BINARY_DIR}/../libc/include/)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142888.510751.patch
Type: text/x-patch
Size: 1031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/804ce8b3/attachment.bin>


More information about the llvm-commits mailing list