[PATCH] D25860: [tsan] Set Darwin specific linker and compiler flags for tsan tests

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 17:56:16 PDT 2016


zaks.anna created this revision.
zaks.anna added a reviewer: kubabrecka.
zaks.anna added a subscriber: llvm-commits.
Herald added subscribers: mgorny, beanz.

We are missing these flags for tsan tests as well. This can cause the Unit tests to be built with a different SDK version than that was used to build the runtime.

(Similar to https://reviews.llvm.org/D25352)


https://reviews.llvm.org/D25860

Files:
  lib/tsan/tests/CMakeLists.txt


Index: lib/tsan/tests/CMakeLists.txt
===================================================================
--- lib/tsan/tests/CMakeLists.txt
+++ lib/tsan/tests/CMakeLists.txt
@@ -12,6 +12,10 @@
   -I${COMPILER_RT_SOURCE_DIR}/lib/tsan/rtl
   -DGTEST_HAS_RTTI=0)
 
+if(APPLE)
+  list(APPEND TSAN_UNITTEST_CFLAGS ${DARWIN_osx_CFLAGS})
+endif()
+
 set(TSAN_RTL_HEADERS)
 foreach (header ${TSAN_HEADERS})
   list(APPEND TSAN_RTL_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../${header})
@@ -78,7 +82,7 @@
         add_compiler_rt_test(TsanUnitTests "${testname}-${arch}-Test"
                 OBJECTS ${TEST_OBJECTS}
                 DEPS ${TEST_DEPS}
-                LINK_FLAGS ${TARGET_LINK_FLAGS}
+                LINK_FLAGS ${TARGET_LINK_FLAGS} ${DARWIN_osx_LINKFLAGS}
                            -lc++)
       endif()
     endforeach()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25860.75385.patch
Type: text/x-patch
Size: 827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161021/cecc3a34/attachment.bin>


More information about the llvm-commits mailing list