diff options
author | Bob Wilson <bob.wilson@apple.com> | 2013-02-05 17:29:03 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2013-02-05 17:29:03 +0000 |
commit | cdb0a58f88c7e17620286b78390d56597ef01dda (patch) | |
tree | 3b4ccd6df0d33e1392eefd95a7ad70f4c08e0f46 | |
parent | 97ebecaa7975016f03769e98f4d462cfc77c1e25 (diff) |
Set the deployment target for Apple llvmCore builds. <rdar://problem/12712431>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174397 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.rules | 16 | ||||
-rw-r--r-- | projects/sample/Makefile.llvm.rules | 16 | ||||
-rwxr-xr-x | utils/buildit/build_llvm | 13 |
3 files changed, 37 insertions, 8 deletions
diff --git a/Makefile.rules b/Makefile.rules index 6abd3934c7..2f566eeb92 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -583,16 +583,24 @@ ifeq ($(HOST_OS),Darwin) LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress SharedLinkOptions := -dynamiclib - ifneq ($(ARCH),ARM) - SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) + ifdef DEPLOYMENT_TARGET + SharedLinkOptions += $(DEPLOYMENT_TARGET) + else + ifneq ($(ARCH),ARM) + SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) + endif endif else SharedLinkOptions=-shared endif ifeq ($(TARGET_OS),Darwin) - ifneq ($(ARCH),ARM) - TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION) + ifdef DEPLOYMENT_TARGET + TargetCommonOpts += $(DEPLOYMENT_TARGET) + else + ifneq ($(ARCH),ARM) + TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION) + endif endif endif diff --git a/projects/sample/Makefile.llvm.rules b/projects/sample/Makefile.llvm.rules index 5d67461285..30f54c45e2 100644 --- a/projects/sample/Makefile.llvm.rules +++ b/projects/sample/Makefile.llvm.rules @@ -501,16 +501,24 @@ ifeq ($(HOST_OS),Darwin) LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress SharedLinkOptions := -dynamiclib - ifneq ($(ARCH),ARM) - SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) + ifdef DEPLOYMENT_TARGET + SharedLinkOptions += $(DEPLOYMENT_TARGET) + else + ifneq ($(ARCH),ARM) + SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) + endif endif else SharedLinkOptions=-shared endif ifeq ($(TARGET_OS),Darwin) - ifneq ($(ARCH),ARM) - TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION) + ifdef DEPLOYMENT_TARGET + TargetCommonOpts += $(DEPLOYMENT_TARGET) + else + ifneq ($(ARCH),ARM) + TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION) + endif endif endif diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index c7777f8338..896ede3e46 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -154,6 +154,11 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then --program-prefix="" \ || exit 1 + if [ -n "$IPHONEOS_DEPLOYMENT_TARGET" ]; then + COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \ + DEPLOYMENT_TARGET=-mios-version-min=$IPHONEOS_DEPLOYMENT_TARGET" + fi + make $JOBS_FLAG $COMMON_MAKEFLAGS SDKROOT= UNIVERSAL_ARCH="$HOSTS" \ CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'" if [ $? != 0 ] ; then @@ -171,8 +176,16 @@ else # Use a non-standard "darwin_sim" host triple to trigger a cross-build. configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \ --build=i686-apple-darwin10" + if [ -n "$IPHONEOS_DEPLOYMENT_TARGET" ]; then + COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \ + DEPLOYMENT_TARGET=-mios-simulator-version-min=$IPHONEOS_DEPLOYMENT_TARGET" + fi else configure_opts="--enable-targets=arm,x86" + if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then + COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \ + DEPLOYMENT_TARGET=-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" + fi fi if [ $SDKROOT ]; then |