summaryrefslogtreecommitdiffstats
path: root/compiler-rt/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/CMakeLists.txt')
-rw-r--r--compiler-rt/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index f3485853f0f..94ebfd0c0bf 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -302,15 +302,20 @@ if(APPLE)
set(SANITIZER_MIN_OSX_VERSION 10.7)
set(CMAKE_OSX_DEPLOYMENT_TARGET "") # We're setting the flag manually below.
set(DARWIN_osx_CFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}
- -isysroot ${OSX_SDK_DIR} -stdlib=libc++)
+ -stdlib=libc++)
set(DARWIN_iossim_CFLAGS
-mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR})
set(DARWIN_osx_LINKFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}
- -isysroot ${OSX_SDK_DIR} -stdlib=libc++)
+ -stdlib=libc++)
set(DARWIN_iossim_LINKFLAGS
-Wl,-ios_simulator_version_min,7.0.0
-mios-simulator-version-min=7.0
-isysroot ${IOSSIM_SDK_DIR})
+
+ if(OSX_SDK_DIR)
+ list(APPEND DARWIN_osx_CFLAGS -isysroot ${OSX_SDK_DIR})
+ list(APPEND DARWIN_osx_LINKFLAGS -isysroot ${OSX_SDK_DIR})
+ endif()
endif()
add_subdirectory(include)
OpenPOWER on IntegriCloud