[compiler-rt] r286859 - [sanitizer] Max out allowed macOS deployment targets to 10.9

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 10:27:47 PST 2016


Author: kuba.brecka
Date: Mon Nov 14 12:27:47 2016
New Revision: 286859

URL: http://llvm.org/viewvc/llvm-project?rev=286859&view=rev
Log:
[sanitizer] Max out allowed macOS deployment targets to 10.9

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.

Differential Revision: https://reviews.llvm.org/D26557


Modified:
    compiler-rt/trunk/cmake/config-ix.cmake

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=286859&r1=286858&r2=286859&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Mon Nov 14 12:27:47 2016
@@ -217,7 +217,11 @@ if(APPLE)
       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()
 




More information about the llvm-commits mailing list