diff options
Diffstat (limited to 'make/platform')
-rw-r--r-- | make/platform/clang_darwin.mk | 34 | ||||
-rw-r--r-- | make/platform/darwin_bni.mk | 1 | ||||
-rw-r--r-- | make/platform/darwin_fat.mk | 56 |
3 files changed, 29 insertions, 62 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk index 6ed3230a0edd..4f71c0b46052 100644 --- a/make/platform/clang_darwin.mk +++ b/make/platform/clang_darwin.mk @@ -44,10 +44,14 @@ XCRun = \ result=`xcrun -find $(1) 2> /dev/null`; \ if [ "$$?" != "0" ]; then result=$(1); fi; \ echo $$result) +# Prefer building with the internal SDKs. XCRunSdkPath = \ $(shell \ - result=`xcrun --sdk $(1) --show-sdk-path 2> /dev/null`; \ - if [ "$$?" != "0" ]; then result=""; fi; \ + result=`xcrun --sdk $(1).internal --show-sdk-path 2> /dev/null`; \ + if [ "$$?" != "0" ]; then \ + result=`xcrun --sdk $(1) --show-sdk-path 2> /dev/null`; \ + if [ "$$?" != "0" ]; then result=""; fi; \ + fi; \ echo $$result) ### @@ -170,17 +174,20 @@ 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 + -DMAC_INTERPOSE_FUNCTIONS=1 \ + -DASAN_DYNAMIC=1 CFLAGS.asan_iossim_dynamic := \ $(CFLAGS) -mios-simulator-version-min=7.0 \ -isysroot $(IOSSIM_SDK) \ -fno-builtin \ -gline-tables-only \ - -DMAC_INTERPOSE_FUNCTIONS=1 + -DMAC_INTERPOSE_FUNCTIONS=1 \ + -DASAN_DYNAMIC=1 CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.6 \ -isysroot $(OSX_SDK) \ @@ -217,7 +224,9 @@ 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 := -lstdc++ -undefined dynamic_lookup -install_name @rpath/libclang_rt.asan_osx_dynamic.dylib +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) # Configure the asan_iossim_dynamic library to be built shared. SHARED_LIBRARY.asan_iossim_dynamic := 1 @@ -257,7 +266,13 @@ FUNCTIONS.asan_iossim_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \ FUNCTIONS.ubsan_osx := $(UbsanFunctions) $(UbsanCXXFunctions) \ $(SanitizerCommonFunctions) +CCKEXT_PROFILE_FUNCTIONS := \ + InstrProfiling \ + InstrProfilingBuffer \ + InstrProfilingPlatformDarwin + CCKEXT_COMMON_FUNCTIONS := \ + $(CCKEXT_PROFILE_FUNCTIONS) \ absvdi2 \ absvsi2 \ addvdi3 \ @@ -402,10 +417,17 @@ CCKEXT_ARMVFP_FUNCTIONS := $(CCKEXT_ARM_FUNCTIONS) \ unorddf2vfp \ unordsf2vfp +CCKEXT_ARM64_FUNCTIONS := \ + $(CCKEXT_PROFILE_FUNCTIONS) \ + divdc3 \ + divsc3 \ + muldc3 \ + mulsc3 + FUNCTIONS.cc_kext.armv7 := $(CCKEXT_ARMVFP_FUNCTIONS) FUNCTIONS.cc_kext.armv7k := $(CCKEXT_ARMVFP_FUNCTIONS) FUNCTIONS.cc_kext.armv7s := $(CCKEXT_ARMVFP_FUNCTIONS) -FUNCTIONS.cc_kext.arm64 := mulsc3 muldc3 divsc3 divdc3 +FUNCTIONS.cc_kext.arm64 := $(CCKEXT_ARM64_FUNCTIONS) FUNCTIONS.cc_kext_ios5.armv7 := $(CCKEXT_ARMVFP_FUNCTIONS) FUNCTIONS.cc_kext_ios5.armv7k := $(CCKEXT_ARMVFP_FUNCTIONS) FUNCTIONS.cc_kext_ios5.armv7s := $(CCKEXT_ARMVFP_FUNCTIONS) diff --git a/make/platform/darwin_bni.mk b/make/platform/darwin_bni.mk index 229609a185df..2fd5089baa92 100644 --- a/make/platform/darwin_bni.mk +++ b/make/platform/darwin_bni.mk @@ -118,6 +118,7 @@ FUNCTIONS.armv7s := $(FUNCTIONS.armv7) FUNCTIONS.arm64 := divti3 modti3 \ udivmodti4 \ udivti3 umodti3 \ + mulsc3 muldc3 \ powisf2 powidf2 \ clzti2 \ fixdfti fixsfti \ diff --git a/make/platform/darwin_fat.mk b/make/platform/darwin_fat.mk deleted file mode 100644 index 65ecd75c9adf..000000000000 --- a/make/platform/darwin_fat.mk +++ /dev/null @@ -1,56 +0,0 @@ -# Configurations to build -# -# This section must define: -# Description - A description of this target. -# Configs - The names of each configuration to build; this is used to build -# multiple libraries inside a single configuration file (for -# example, Debug and Release builds, or builds with and without -# software floating point). -# -# This section must define one of: -# UniversalArchs - A list of architectures to build for, when using universal build -# support (e.g., on Darwin). This should only be used to build fat -# libraries, simply building multiple libraries for different -# architectures should do so using distinct configs, with the -# appropriate choices for CC and CFLAGS. -# -# Arch - The target architecture; this must match the compiler-rt name for the -# architecture and is used to find the appropriate function -# implementations. -# -# When not universal builds, this section may define: -# Arch.<Config Name> - Set the target architecture on a per-config basis. - -Description := Target for building universal libraries for Darwin. - -Configs := Debug Release Profile -UniversalArchs := i386 x86_64 - -# Platform Options -# -# This section may override any of the variables in make/options.mk, using: -# <Option Name> := ... option value ... -# -# See make/options.mk for the available options and their meanings. Options can -# be override on a per-config, per-arch, or per-config-and-arch basis using: -# <Option Name>.<Config Name> := ... -# <Option Name>.<Arch Name> := ... -# <Option Name>.<Config Name>.<Arch Name> := ... - -CC := clang - -CFLAGS := -Wall -Werror -CFLAGS.Debug := $(CFLAGS) -g -CFLAGS.Release := $(CFLAGS) -O3 -fomit-frame-pointer -CFLAGS.Profile := $(CFLAGS) -pg -g - -FUNCTIONS.i386 := $(CommonFunctions) $(ArchFunctions.i386) -FUNCTIONS.ppc := $(CommonFunctions) $(ArchFunctions.ppc) -FUNCTIONS.x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64) -FUNCTIONS.armv5 := $(CommonFunctions) $(ArchFunctions.armv5) -FUNCTIONS.armv6 := $(CommonFunctions) $(ArchFunctions.armv6) -FUNCTIONS.armv7 := $(CommonFunctions) $(ArchFunctions.armv7) - -OPTIMIZED.Debug := 0 - -VISIBILITY_HIDDEN := 1 |