llvm.org GIT mirror llvm / cdb0a58
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 Bob Wilson 6 years ago
3 changed file(s) with 37 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
582582
583583 LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
584584 SharedLinkOptions := -dynamiclib
585 ifneq ($(ARCH),ARM)
586 SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
585 ifdef DEPLOYMENT_TARGET
586 SharedLinkOptions += $(DEPLOYMENT_TARGET)
587 else
588 ifneq ($(ARCH),ARM)
589 SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
590 endif
587591 endif
588592 else
589593 SharedLinkOptions=-shared
590594 endif
591595
592596 ifeq ($(TARGET_OS),Darwin)
593 ifneq ($(ARCH),ARM)
594 TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
597 ifdef DEPLOYMENT_TARGET
598 TargetCommonOpts += $(DEPLOYMENT_TARGET)
599 else
600 ifneq ($(ARCH),ARM)
601 TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
602 endif
595603 endif
596604 endif
597605
500500
501501 LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
502502 SharedLinkOptions := -dynamiclib
503 ifneq ($(ARCH),ARM)
504 SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
503 ifdef DEPLOYMENT_TARGET
504 SharedLinkOptions += $(DEPLOYMENT_TARGET)
505 else
506 ifneq ($(ARCH),ARM)
507 SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
508 endif
505509 endif
506510 else
507511 SharedLinkOptions=-shared
508512 endif
509513
510514 ifeq ($(TARGET_OS),Darwin)
511 ifneq ($(ARCH),ARM)
512 TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
515 ifdef DEPLOYMENT_TARGET
516 TargetCommonOpts += $(DEPLOYMENT_TARGET)
517 else
518 ifneq ($(ARCH),ARM)
519 TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
520 endif
513521 endif
514522 endif
515523
153153 --program-prefix="" \
154154 || exit 1
155155
156 if [ -n "$IPHONEOS_DEPLOYMENT_TARGET" ]; then
157 COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \
158 DEPLOYMENT_TARGET=-mios-version-min=$IPHONEOS_DEPLOYMENT_TARGET"
159 fi
160
156161 make $JOBS_FLAG $COMMON_MAKEFLAGS SDKROOT= UNIVERSAL_ARCH="$HOSTS" \
157162 CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'"
158163 if [ $? != 0 ] ; then
170175 # Use a non-standard "darwin_sim" host triple to trigger a cross-build.
171176 configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
172177 --build=i686-apple-darwin10"
178 if [ -n "$IPHONEOS_DEPLOYMENT_TARGET" ]; then
179 COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \
180 DEPLOYMENT_TARGET=-mios-simulator-version-min=$IPHONEOS_DEPLOYMENT_TARGET"
181 fi
173182 else
174183 configure_opts="--enable-targets=arm,x86"
184 if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then
185 COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \
186 DEPLOYMENT_TARGET=-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
187 fi
175188 fi
176189
177190 if [ $SDKROOT ]; then