[compiler-rt] r177859 - [TSan] Build TSan unit tests with the same compile flags as TSan runtime

Alexey Samsonov samsonov at google.com
Mon Mar 25 03:23:20 PDT 2013


Author: samsonov
Date: Mon Mar 25 05:23:20 2013
New Revision: 177859

URL: http://llvm.org/viewvc/llvm-project?rev=177859&view=rev
Log:
[TSan] Build TSan unit tests with the same compile flags as TSan runtime

Modified:
    compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt?rev=177859&r1=177858&r2=177859&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt Mon Mar 25 05:23:20 2013
@@ -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()





More information about the llvm-commits mailing list