diff options
| author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2019-02-17 18:47:33 +0000 |
|---|---|---|
| committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2019-02-17 18:47:33 +0000 |
| commit | 0a9cb239a6c91a709a98c96bbf60b6c006d5a07b (patch) | |
| tree | 5a679033a904ae7ff22ab3f02f39a88144122daf /compiler-rt/test/tsan/ignore_lib0.cc | |
| parent | 635b988578505eee09ff304974bc2a72becb66d3 (diff) | |
| download | bcm5719-llvm-0a9cb239a6c91a709a98c96bbf60b6c006d5a07b.tar.gz bcm5719-llvm-0a9cb239a6c91a709a98c96bbf60b6c006d5a07b.zip | |
[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.
llvm-svn: 354231
Diffstat (limited to 'compiler-rt/test/tsan/ignore_lib0.cc')
| -rw-r--r-- | compiler-rt/test/tsan/ignore_lib0.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/test/tsan/ignore_lib0.cc b/compiler-rt/test/tsan/ignore_lib0.cc index 2b217f21ff5..1d375336b1c 100644 --- a/compiler-rt/test/tsan/ignore_lib0.cc +++ b/compiler-rt/test/tsan/ignore_lib0.cc @@ -2,7 +2,7 @@ // RUN: mkdir %t-dir // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib0.so -// RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 -o %t +// RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 %link_libcxx_tsan -o %t // RUN: echo running w/o suppressions: // RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP // RUN: echo running with suppressions: |

