summaryrefslogtreecommitdiff
path: root/test/hwasan
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-08-06 23:43:20 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-08-06 23:43:20 +0000
commit1da5872202e36da915bb8e8dc8b665569967a5e0 (patch)
treeabc10e68f57401827f3432802a9a0d9a4edd6727 /test/hwasan
parent997a8c066d12e3f6f8f3ee2e681741cc0d4b02c4 (diff)
downloadcompiler-rt-1da5872202e36da915bb8e8dc8b665569967a5e0.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@368111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/hwasan')
-rw-r--r--test/hwasan/CMakeLists.txt3
-rw-r--r--test/hwasan/TestCases/cfi.cpp2
-rw-r--r--test/hwasan/lit.cfg.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/test/hwasan/CMakeLists.txt b/test/hwasan/CMakeLists.txt
index 632309ae7..541604037 100644
--- a/test/hwasan/CMakeLists.txt
+++ b/test/hwasan/CMakeLists.txt
@@ -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"
diff --git a/test/hwasan/TestCases/cfi.cpp b/test/hwasan/TestCases/cfi.cpp
index e64b55617..648473983 100644
--- a/test/hwasan/TestCases/cfi.cpp
+++ b/test/hwasan/TestCases/cfi.cpp
@@ -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
diff --git a/test/hwasan/lit.cfg.py b/test/hwasan/lit.cfg.py
index f506e703b..47d5624ac 100644
--- a/test/hwasan/lit.cfg.py
+++ b/test/hwasan/lit.cfg.py
@@ -11,7 +11,7 @@ config.test_source_root = os.path.dirname(__file__)
# 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