[PATCH] D26557: [sanitizer] Max out allowed macOS deployment targets to 10.9

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 12:33:58 PST 2016


kubabrecka created this revision.
kubabrecka added reviewers: beanz, zaks.anna, compnerd.
kubabrecka added a subscriber: llvm-commits.
kubabrecka set the repository for this revision to rL LLVM.
kubabrecka added a project: Sanitizers.
Herald added a subscriber: mgorny.

It's not a good idea to build the sanitizers with e.g. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12, because some deprecated functions that we intercept will cause build errors.  Let's limit the allowed deployment targets to 10.9 (which is the default anyway), and warn when it's set above.


Repository:
  rL LLVM

https://reviews.llvm.org/D26557

Files:
  cmake/config-ix.cmake


Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -217,7 +217,11 @@
       set(SANITIZER_MIN_OSX_VERSION 10.9)
     endif()
     if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7")
-      message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}")
+      message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.")
+    endif()
+    if(SANITIZER_MIN_OSX_VERSION VERSION_GREATER "10.9")
+      message(WARNING "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too new, setting to '10.9' instead.")
+      set(SANITIZER_MIN_OSX_VERSION 10.9)
     endif()
   endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26557.77652.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161111/ae4136ce/attachment.bin>


More information about the llvm-commits mailing list