[PATCH] [compiler-rt] Fix OS X build failure with Command Line Tools and without full Xcode installation
Justin Bogner
mail at justinbogner.com
Mon Feb 16 09:27:05 PST 2015
Kuba Brecka <kuba.brecka at gmail.com> writes:
> On OS X, if you don't have a full Xcode installation, but just the
> Command Line Tools package, xcrun and xcodebuild don't return a valid
> SDK root path. In these cases, let's use "/" as the SDK root (which
> is where the headers and libraries are installed).
>
> See
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150202/256851.html.
As I mentioned in that thread, I have a slight preference for omitting
the -isysroot completely in the empty case. If that's awkward or not
worth it, then this is fine.
LGTM.
> http://reviews.llvm.org/D7641
>
> Files:
> CMakeLists.txt
> make/platform/clang_darwin.mk
>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt
> +++ CMakeLists.txt
> @@ -295,6 +295,9 @@
> string(REGEX MATCH "-mmacosx-version-min="
> MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}")
> set(SANITIZER_COMMON_SUPPORTED_DARWIN_OS osx)
> + if (NOT OSX_SDK_DIR) # Probably a Command Line Tools setup
> + set(OSX_SDK_DIR "/")
> + endif()
> if (IOSSIM_SDK_DIR AND NOT MACOSX_VERSION_MIN_FLAG)
> list(APPEND SANITIZER_COMMON_SUPPORTED_DARWIN_OS iossim)
> endif()
> Index: make/platform/clang_darwin.mk
> ===================================================================
> --- make/platform/clang_darwin.mk
> +++ make/platform/clang_darwin.mk
> @@ -64,6 +64,9 @@
> DSYMUTIL := $(call XCRun,dsymutil)
>
> OSX_SDK := $(call XCRunSdkPath,macosx)
> +ifeq ($(OSX_SDK),)
> +OSX_SDK := /
> +endif
> IOS_SDK := $(call XCRunSdkPath,iphoneos)
> IOSSIM_SDK := $(call XCRunSdkPath,iphonesimulator)
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list