summaryrefslogtreecommitdiff
path: root/test/tsan/ignore_lib5.cc
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2019-02-17 18:47:33 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2019-02-17 18:47:33 +0000
commitfb76b337196ad05c5047a9a981c448139d0090d8 (patch)
tree93055ad10448fcea2f57921b8d0bba163f7af010 /test/tsan/ignore_lib5.cc
parentbcc157dfbc24b73d6330ff25fdb14eecd9872f42 (diff)
downloadcompiler-rt-fb76b337196ad05c5047a9a981c448139d0090d8.tar.gz
[compiler-rt] Fix broken sanitizer bots (hopefully)
According to the logs and local debugging there were two issues: 1) tsan tests listed libc++.a before the source file. That's usually ok for shared libraries, but the linker will not add symbols from a static library unless needed at that time. As a result the tests that rely upon symbols from the library (and not only include the headers) had undefined references. To solve this I'm adding a new substitution %link_libcxx_tsan which expands to libc++.a if available. 2) The target Fuzzer-x86_64-Test linked in SANITIZER_TEST_CXX_LIBRARIES which defaults to -lstdc++. This resulted in error messages like hidden symbol '_ZdlPv' is not defined locally hidden symbol '_Znwm' is not defined locally when using GNU gold (ld.bfd and lld are fine). Removing the linkage is fine because we build a custom libc++ for that purpose. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/ignore_lib5.cc')
-rw-r--r--test/tsan/ignore_lib5.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tsan/ignore_lib5.cc b/test/tsan/ignore_lib5.cc
index 43780daf7..81a1840c9 100644
--- a/test/tsan/ignore_lib5.cc
+++ b/test/tsan/ignore_lib5.cc
@@ -2,7 +2,7 @@
// RUN: mkdir %t-dir
// RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so
-// RUN: %clangxx_tsan -O1 %s -o %t-dir/executable
+// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable
// RUN: echo running w/o suppressions:
// RUN: %deflake %run %t-dir/executable | FileCheck %s --check-prefix=CHECK-NOSUPP
// RUN: echo running with suppressions: