[PATCH] D20670: [tsan] On OS X, build Go runtime with -mmacosx-version-min

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 02:40:30 PDT 2016


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, kcc, glider, samsonov.
kubabrecka added subscribers: llvm-commits, zaks.anna, dcoughlin.
kubabrecka added a project: Sanitizers.
Herald added a subscriber: kubabrecka.

We're not building the Go runtime with -mmacosx-version-min, which means it'll have a minimum deployment target set to the system you're building on.  Let's make the code compile (and link) with the same -mmacosx-version-min flag as the rest of TSan.

http://reviews.llvm.org/D20670

Files:
  lib/tsan/CMakeLists.txt

Index: lib/tsan/CMakeLists.txt
===================================================================
--- lib/tsan/CMakeLists.txt
+++ lib/tsan/CMakeLists.txt
@@ -126,7 +126,7 @@
   # Build and check Go runtime.
   set(BUILDGO_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/go/buildgo.sh)
   add_custom_target(GotsanRuntimeCheck
-    COMMAND env "CC=${CMAKE_C_COMPILER} ${OSX_SYSROOT_FLAG}"
+    COMMAND env "CC=${CMAKE_C_COMPILER} ${OSX_SYSROOT_FLAG} -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}"
             IN_TMPDIR=1 SILENT=1 ${BUILDGO_SCRIPT}
     DEPENDS tsan ${BUILDGO_SCRIPT}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/go


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20670.58582.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/ac0abb21/attachment.bin>


More information about the llvm-commits mailing list