[PATCH] D49940: Include the unittest link flags in the sanizier test link flags.
John Baldwin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 27 14:59:15 PDT 2018
bsdjhb created this revision.
Herald added subscribers: Sanitizers, delcypher, mgorny, kubamracek.
This fixes linking of tests when cross-building.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49940
Files:
lib/sanitizer_common/tests/CMakeLists.txt
Index: lib/sanitizer_common/tests/CMakeLists.txt
===================================================================
--- lib/sanitizer_common/tests/CMakeLists.txt
+++ lib/sanitizer_common/tests/CMakeLists.txt
@@ -62,6 +62,11 @@
list(APPEND SANITIZER_TEST_CFLAGS_COMMON -fno-exceptions -DGTEST_HAS_SEH=0)
endif()
+# This will ensure the target linker is used
+# during cross compilation
+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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49940.157780.patch
Type: text/x-patch
Size: 662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180727/035ed980/attachment.bin>
More information about the llvm-commits
mailing list