[PATCH] D60143: [compiler-rt][tests] Propagate COMPILER_RT_UNITTEST_LINK_FLAGS

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 15:23:04 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT359733: [compiler-rt][tests] Propagate COMPILER_RT_UNITTEST_LINK_FLAGS (authored by hubert.reinterpretcast, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60143?vs=193330&id=197656#toc

Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D60143

Files:
  lib/interception/tests/CMakeLists.txt
  lib/msan/tests/CMakeLists.txt
  lib/sanitizer_common/tests/CMakeLists.txt
  lib/scudo/standalone/tests/CMakeLists.txt
  lib/tsan/tests/CMakeLists.txt
  lib/xray/tests/CMakeLists.txt


Index: lib/tsan/tests/CMakeLists.txt
===================================================================
--- lib/tsan/tests/CMakeLists.txt
+++ lib/tsan/tests/CMakeLists.txt
@@ -15,7 +15,7 @@
 
 set(TSAN_TEST_ARCH ${TSAN_SUPPORTED_ARCH})
 
-set(LINK_FLAGS)
+set(LINK_FLAGS ${COMPILER_RT_UNITTEST_LINK_FLAGS})
 foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES})
   list(APPEND LINK_FLAGS -l${lib})
 endforeach()
Index: lib/interception/tests/CMakeLists.txt
===================================================================
--- lib/interception/tests/CMakeLists.txt
+++ lib/interception/tests/CMakeLists.txt
@@ -21,6 +21,9 @@
   -Werror=sign-compare
   -Wno-non-virtual-dtor)
 
+set(INTERCEPTION_TEST_LINK_FLAGS_COMMON
+  ${COMPILER_RT_UNITTEST_LINK_FLAGS})
+
 # -gline-tables-only must be enough for these tests, so use it if possible.
 if(COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang")
   list(APPEND INTERCEPTION_TEST_CFLAGS_COMMON -gline-tables-only)
Index: lib/msan/tests/CMakeLists.txt
===================================================================
--- lib/msan/tests/CMakeLists.txt
+++ lib/msan/tests/CMakeLists.txt
@@ -47,6 +47,7 @@
   -mllvm -msan-keep-going=1
 )
 set(MSAN_UNITTEST_LINK_FLAGS
+  ${COMPILER_RT_UNITTEST_LINK_FLAGS}
   -fsanitize=memory
   # Don't need -stdlib=libc++ because we explicitly list libc++.a in the linker
   # inputs.
@@ -73,7 +74,7 @@
   endif()
   clang_link_shared(${output_so}
                 OBJECTS ${SOURCE_OBJECTS}
-                LINK_FLAGS ${TARGET_LINK_FLAGS} ${SOURCE_LINK_FLAGS}
+                LINK_FLAGS ${COMPILER_RT_UNITTEST_LINK_FLAGS} ${TARGET_LINK_FLAGS} ${SOURCE_LINK_FLAGS}
                 DEPS ${SOURCE_DEPS})
   list(APPEND ${so_list} ${output_so})
 endmacro()
Index: lib/xray/tests/CMakeLists.txt
===================================================================
--- lib/xray/tests/CMakeLists.txt
+++ lib/xray/tests/CMakeLists.txt
@@ -47,7 +47,10 @@
 endfunction()
 
 set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH})
-set(XRAY_UNITTEST_LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT})
+set(XRAY_UNITTEST_LINK_FLAGS
+  ${COMPILER_RT_UNITTEST_LINK_FLAGS}
+  ${CMAKE_THREAD_LIBS_INIT}
+  )
 
 if (NOT APPLE)
   # Needed by LLVMSupport.
Index: lib/sanitizer_common/tests/CMakeLists.txt
===================================================================
--- lib/sanitizer_common/tests/CMakeLists.txt
+++ lib/sanitizer_common/tests/CMakeLists.txt
@@ -59,6 +59,8 @@
   -Wno-non-virtual-dtor
   -Wno-gnu-zero-variadic-macro-arguments)
 
+set(SANITIZER_TEST_LINK_FLAGS_COMMON ${COMPILER_RT_UNITTEST_LINK_FLAGS})
+
 # -gline-tables-only must be enough for these tests, so use it if possible.
 if(COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang")
   list(APPEND SANITIZER_TEST_CFLAGS_COMMON -gline-tables-only)
Index: lib/scudo/standalone/tests/CMakeLists.txt
===================================================================
--- lib/scudo/standalone/tests/CMakeLists.txt
+++ lib/scudo/standalone/tests/CMakeLists.txt
@@ -15,7 +15,7 @@
 set(SCUDO_TEST_ARCH ${SCUDO_STANDALONE_SUPPORTED_ARCH})
 
 # gtests requires c++
-set(LINK_FLAGS)
+set(LINK_FLAGS ${COMPILER_RT_UNITTEST_LINK_FLAGS})
 foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES})
   list(APPEND LINK_FLAGS -l${lib})
 endforeach()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60143.197656.patch
Type: text/x-patch
Size: 3220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190501/d8fcc9e4/attachment.bin>


More information about the llvm-commits mailing list