[compiler-rt] r368111 - Require lld for hwasan tests.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 16:43:26 PDT 2019


Author: pcc
Date: Tue Aug  6 16:43:20 2019
New Revision: 368111

URL: http://llvm.org/viewvc/llvm-project?rev=368111&view=rev
Log:
Require lld for hwasan tests.

We're using relocations that are unsupported by the version of gold on the
bot, so force the use of lld. One of the tests is already using lld,
so this should be safe.

Modified:
    compiler-rt/trunk/test/hwasan/CMakeLists.txt
    compiler-rt/trunk/test/hwasan/TestCases/cfi.cpp
    compiler-rt/trunk/test/hwasan/lit.cfg.py

Modified: compiler-rt/trunk/test/hwasan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/CMakeLists.txt?rev=368111&r1=368110&r2=368111&view=diff
==============================================================================
--- compiler-rt/trunk/test/hwasan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/hwasan/CMakeLists.txt Tue Aug  6 16:43:20 2019
@@ -23,6 +23,9 @@ endforeach()
 set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
 if(NOT COMPILER_RT_STANDALONE_BUILD)
   list(APPEND HWASAN_TEST_DEPS hwasan)
+  if(COMPILER_RT_HAS_LLD)
+    list(APPEND HWASAN_TEST_DEPS lld)
+  endif()
 endif()
 
 add_lit_testsuite(check-hwasan "Running the HWAddressSanitizer tests"

Modified: compiler-rt/trunk/test/hwasan/TestCases/cfi.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/TestCases/cfi.cpp?rev=368111&r1=368110&r2=368111&view=diff
==============================================================================
--- compiler-rt/trunk/test/hwasan/TestCases/cfi.cpp (original)
+++ compiler-rt/trunk/test/hwasan/TestCases/cfi.cpp Tue Aug  6 16:43:20 2019
@@ -1,4 +1,4 @@
-// RUN: %clangxx_hwasan -fsanitize=cfi -fno-sanitize-trap=cfi -flto -fvisibility=hidden -fuse-ld=lld %s -o %t
+// RUN: %clangxx_hwasan -fsanitize=cfi -fno-sanitize-trap=cfi -flto -fvisibility=hidden %s -o %t
 // RUN: not %run %t 2>&1 | FileCheck %s
 
 // REQUIRES: android

Modified: compiler-rt/trunk/test/hwasan/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/lit.cfg.py?rev=368111&r1=368110&r2=368111&view=diff
==============================================================================
--- compiler-rt/trunk/test/hwasan/lit.cfg.py (original)
+++ compiler-rt/trunk/test/hwasan/lit.cfg.py Tue Aug  6 16:43:20 2019
@@ -11,7 +11,7 @@ config.test_source_root = os.path.dirnam
 # Setup default compiler flags used with -fsanitize=memory option.
 clang_cflags = [config.target_cflags] + config.debug_info_flags
 clang_cxxflags = config.cxx_mode_flags + clang_cflags
-clang_hwasan_cflags = ["-fsanitize=hwaddress", "-mllvm", "-hwasan-globals"] + clang_cflags
+clang_hwasan_cflags = ["-fsanitize=hwaddress", "-mllvm", "-hwasan-globals", "-fuse-ld=lld"] + clang_cflags
 if config.target_arch == 'x86_64':
   # This does basically the same thing as tagged-globals on aarch64. Because
   # the x86_64 implementation is for testing purposes only there is no




More information about the llvm-commits mailing list