[llvm] r174397 - Set the deployment target for Apple llvmCore builds. <rdar://problem/12712431>
Bob Wilson
bob.wilson at apple.com
Tue Feb 5 09:29:03 PST 2013
Author: bwilson
Date: Tue Feb 5 11:29:03 2013
New Revision: 174397
URL: http://llvm.org/viewvc/llvm-project?rev=174397&view=rev
Log:
Set the deployment target for Apple llvmCore builds. <rdar://problem/12712431>
Modified:
llvm/trunk/Makefile.rules
llvm/trunk/projects/sample/Makefile.llvm.rules
llvm/trunk/utils/buildit/build_llvm
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=174397&r1=174396&r2=174397&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Feb 5 11:29:03 2013
@@ -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
Modified: llvm/trunk/projects/sample/Makefile.llvm.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/sample/Makefile.llvm.rules?rev=174397&r1=174396&r2=174397&view=diff
==============================================================================
--- llvm/trunk/projects/sample/Makefile.llvm.rules (original)
+++ llvm/trunk/projects/sample/Makefile.llvm.rules Tue Feb 5 11:29:03 2013
@@ -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
Modified: llvm/trunk/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=174397&r1=174396&r2=174397&view=diff
==============================================================================
--- llvm/trunk/utils/buildit/build_llvm (original)
+++ llvm/trunk/utils/buildit/build_llvm Tue Feb 5 11:29:03 2013
@@ -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
More information about the llvm-commits
mailing list