Skip to content

Commit 96afdbd

Browse files
committed
Setting OSX version after the block if it is not defined
1 parent 938ea99 commit 96afdbd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler-rt/cmake/config-ix.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ if(APPLE)
468468

469469
set(DEFAULT_SANITIZER_MIN_OSX_VERSION 10.10)
470470
set(DARWIN_osx_MIN_VER_FLAG "-mmacosx-version-min")
471-
if(SANITIZER_MIN_OSX_VERSION STREQUAL "")
471+
if(NOT SANITIZER_MIN_OSX_VERSION)
472472
string(REGEX MATCH "${DARWIN_osx_MIN_VER_FLAG}=([.0-9]+)"
473473
MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}")
474474
if(MACOSX_VERSION_MIN_FLAG)
@@ -479,6 +479,8 @@ if(APPLE)
479479
set(MIN_OSX_VERSION ${DEFAULT_SANITIZER_MIN_OSX_VERSION})
480480
endif()
481481

482+
# Note: In order to target x86_64h on OS X the minimum deployment target must
483+
# be 10.8 or higher.
482484
if(MIN_OSX_VERSION VERSION_LESS "10.7")
483485
message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.")
484486
endif()
@@ -488,7 +490,7 @@ if(APPLE)
488490
endif()
489491

490492
set(SANITIZER_MIN_OSX_VERSION "${MIN_OSX_VERSION}" CACHE STRING
491-
"Minimum OS X version to target (e.g. 10.10) for sanitizers." FORCE)
493+
"Minimum OS X version to target (e.g. 10.10) for sanitizers.")
492494
endif()
493495

494496
# We're setting the flag manually for each target OS

0 commit comments

Comments
 (0)