summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()