diff options
author | David Carlier <devnexen@gmail.com> | 2018-06-20 20:17:44 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2018-06-20 20:17:44 +0000 |
commit | 66afe8db783c9bfc2001ef456d3f63d601d4cb55 (patch) | |
tree | 12da2707c0dd52a0d9675989926b5cd4622ff45b /lib | |
parent | 8753f67b54c2fbc6e948d3ced43d16b130fd9104 (diff) |
[TSan] fix build and couple of unit tests on FreeBSD
Similarly to Msan adding -pie provokes linkage issue, was spotted with pie_test.cc
Set to XFAIL for couple of unit tests.
Reviewers: vitalybuka, krytarowski, dim
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D48317
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@335166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tsan/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt index 8a414d472..51a43e170 100644 --- a/lib/tsan/CMakeLists.txt +++ b/lib/tsan/CMakeLists.txt @@ -5,7 +5,10 @@ include_directories(..) set(TSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS}) # SANITIZER_COMMON_CFLAGS contains -fPIC, but it's performance-critical for # TSan runtime to be built with -fPIE to reduce the number of register spills. -append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE TSAN_CFLAGS) +# On FreeBSD however it provokes linkage issue thus we disable it. +if(NOT CMAKE_SYSTEM MATCHES "FreeBSD") + append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE TSAN_CFLAGS) +endif() append_rtti_flag(OFF TSAN_CFLAGS) if(COMPILER_RT_TSAN_DEBUG_OUTPUT) |