diff options
| author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-02-28 12:25:10 +0000 |
|---|---|---|
| committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-02-28 12:25:10 +0000 |
| commit | ca48abc9b39ad1201d2a782d69a8597ce4c8eecc (patch) | |
| tree | 71beac4d40dd0756a90d49088c171167479cfbcb /compiler-rt/make | |
| parent | f1362f61960b36665592f34811540096ddc089f4 (diff) | |
| download | bcm5719-llvm-ca48abc9b39ad1201d2a782d69a8597ce4c8eecc.tar.gz bcm5719-llvm-ca48abc9b39ad1201d2a782d69a8597ce4c8eecc.zip | |
Fix OS X build failure with Command Line Tools and without full Xcode installation
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).
Reviewed at http://reviews.llvm.org/D7641
llvm-svn: 230847
Diffstat (limited to 'compiler-rt/make')
| -rw-r--r-- | compiler-rt/make/platform/clang_darwin.mk | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler-rt/make/platform/clang_darwin.mk b/compiler-rt/make/platform/clang_darwin.mk index 4f71c0b4605..58314e4480e 100644 --- a/compiler-rt/make/platform/clang_darwin.mk +++ b/compiler-rt/make/platform/clang_darwin.mk @@ -175,7 +175,6 @@ CFLAGS.10.4 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) CFLAGS.asan_osx_dynamic := \ $(CFLAGS) -mmacosx-version-min=10.7 \ -stdlib=libc++ \ - -isysroot $(OSX_SDK) \ -fno-builtin \ -gline-tables-only \ -DMAC_INTERPOSE_FUNCTIONS=1 \ @@ -190,7 +189,6 @@ CFLAGS.asan_iossim_dynamic := \ -DASAN_DYNAMIC=1 CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.6 \ - -isysroot $(OSX_SDK) \ -fno-builtin CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) @@ -225,8 +223,7 @@ CFLAGS.profile_ios.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) # Configure the asan_osx_dynamic library to be built shared. SHARED_LIBRARY.asan_osx_dynamic := 1 LDFLAGS.asan_osx_dynamic := -lc++ -undefined dynamic_lookup -install_name @rpath/libclang_rt.asan_osx_dynamic.dylib \ - -mmacosx-version-min=10.7 \ - -isysroot $(OSX_SDK) + -mmacosx-version-min=10.7 # Configure the asan_iossim_dynamic library to be built shared. SHARED_LIBRARY.asan_iossim_dynamic := 1 @@ -236,6 +233,13 @@ LDFLAGS.asan_iossim_dynamic := -undefined dynamic_lookup -install_name @rpath/li -Wl,-ios_simulator_version_min,7.0.0 \ -mios-simulator-version-min=7.0 -isysroot $(IOSSIM_SDK) +ifneq ($(OSX_SDK),) +CFLAGS.asan_osx_dynamic += -isysroot $(OSX_SDK) +LDFLAGS.asan_osx_dynamic += -isysroot $(OSX_SDK) +CFLAGS.ubsan_osx += -isysroot $(OSX_SDK) +LDFLAGS.ubsan_osx += -isysroot $(OSX_SDK) +endif + FUNCTIONS.eprintf := eprintf FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf |

