forked from OSchip/llvm-project
Set the deployment target for Apple llvmCore builds. <rdar://problem/12712431>
llvm-svn: 174397
This commit is contained in:
parent
20e3dcc80b
commit
a786b2c3d1
llvm
|
@ -583,16 +583,24 @@ ifeq ($(HOST_OS),Darwin)
|
||||||
|
|
||||||
LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
|
LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
|
||||||
SharedLinkOptions := -dynamiclib
|
SharedLinkOptions := -dynamiclib
|
||||||
ifneq ($(ARCH),ARM)
|
ifdef DEPLOYMENT_TARGET
|
||||||
SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
|
SharedLinkOptions += $(DEPLOYMENT_TARGET)
|
||||||
|
else
|
||||||
|
ifneq ($(ARCH),ARM)
|
||||||
|
SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
SharedLinkOptions=-shared
|
SharedLinkOptions=-shared
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_OS),Darwin)
|
ifeq ($(TARGET_OS),Darwin)
|
||||||
ifneq ($(ARCH),ARM)
|
ifdef DEPLOYMENT_TARGET
|
||||||
TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
|
TargetCommonOpts += $(DEPLOYMENT_TARGET)
|
||||||
|
else
|
||||||
|
ifneq ($(ARCH),ARM)
|
||||||
|
TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -501,16 +501,24 @@ ifeq ($(HOST_OS),Darwin)
|
||||||
|
|
||||||
LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
|
LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
|
||||||
SharedLinkOptions := -dynamiclib
|
SharedLinkOptions := -dynamiclib
|
||||||
ifneq ($(ARCH),ARM)
|
ifdef DEPLOYMENT_TARGET
|
||||||
SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
|
SharedLinkOptions += $(DEPLOYMENT_TARGET)
|
||||||
|
else
|
||||||
|
ifneq ($(ARCH),ARM)
|
||||||
|
SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
SharedLinkOptions=-shared
|
SharedLinkOptions=-shared
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_OS),Darwin)
|
ifeq ($(TARGET_OS),Darwin)
|
||||||
ifneq ($(ARCH),ARM)
|
ifdef DEPLOYMENT_TARGET
|
||||||
TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
|
TargetCommonOpts += $(DEPLOYMENT_TARGET)
|
||||||
|
else
|
||||||
|
ifneq ($(ARCH),ARM)
|
||||||
|
TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,11 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then
|
||||||
--program-prefix="" \
|
--program-prefix="" \
|
||||||
|| exit 1
|
|| 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" \
|
make $JOBS_FLAG $COMMON_MAKEFLAGS SDKROOT= UNIVERSAL_ARCH="$HOSTS" \
|
||||||
CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'"
|
CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'"
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
|
@ -171,8 +176,16 @@ else
|
||||||
# Use a non-standard "darwin_sim" host triple to trigger a cross-build.
|
# Use a non-standard "darwin_sim" host triple to trigger a cross-build.
|
||||||
configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
|
configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
|
||||||
--build=i686-apple-darwin10"
|
--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
|
else
|
||||||
configure_opts="--enable-targets=arm,x86"
|
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
|
fi
|
||||||
|
|
||||||
if [ $SDKROOT ]; then
|
if [ $SDKROOT ]; then
|
||||||
|
|
Loading…
Reference in New Issue