Skip to content

Commit 41c5288

Browse files
committed
[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 llvm-svn: 286859
1 parent 1c7fe12 commit 41c5288

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler-rt/cmake/config-ix.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@ if(APPLE)
217217
set(SANITIZER_MIN_OSX_VERSION 10.9)
218218
endif()
219219
if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7")
220-
message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}")
220+
message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.")
221+
endif()
222+
if(SANITIZER_MIN_OSX_VERSION VERSION_GREATER "10.9")
223+
message(WARNING "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too new, setting to '10.9' instead.")
224+
set(SANITIZER_MIN_OSX_VERSION 10.9)
221225
endif()
222226
endif()
223227

0 commit comments

Comments
 (0)