summaryrefslogtreecommitdiff
path: root/lib/tsan/tests
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-25 10:23:20 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-25 10:23:20 +0000
commitf58a1ea0483690df5faa93bbde8d4301170c542d (patch)
tree567a73db2b291bbdec88c66f5d9b8ff3ee583e95 /lib/tsan/tests
parent8b30c254a63a7421dd81d13dee086a54c4ca134b (diff)
downloadcompiler-rt-f58a1ea0483690df5faa93bbde8d4301170c542d.tar.gz
compiler-rt-f58a1ea0483690df5faa93bbde8d4301170c542d.tar.bz2
compiler-rt-f58a1ea0483690df5faa93bbde8d4301170c542d.tar.xz
[TSan] Build TSan unit tests with the same compile flags as TSan runtime
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/tests')
-rw-r--r--lib/tsan/tests/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tsan/tests/CMakeLists.txt b/lib/tsan/tests/CMakeLists.txt
index 0fcc6b2b..7cc079f3 100644
--- a/lib/tsan/tests/CMakeLists.txt
+++ b/lib/tsan/tests/CMakeLists.txt
@@ -12,9 +12,9 @@ function(add_tsan_unittest testname)
add_unittest(TsanUnitTests ${testname} ${ARGN})
# Link with TSan runtime.
target_link_libraries(${testname} clang_rt.tsan-x86_64)
- # Build tests with PIE and debug info.
- set_property(TARGET ${testname} APPEND_STRING
- PROPERTY COMPILE_FLAGS " -fPIE -g")
+ # Compile tests with the same flags as TSan runtime.
+ set_target_compile_flags(${testname} ${TSAN_CFLAGS})
+ # Link tests with -pie.
set_property(TARGET ${testname} APPEND_STRING
PROPERTY LINK_FLAGS " -pie")
endif()