aboutsummaryrefslogtreecommitdiff
path: root/utils/buildit/GNUmakefile
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-07-20 20:44:02 +0000
committerBob Wilson <bob.wilson@apple.com>2010-07-20 20:44:02 +0000
commit273e48b53b0a44629eb90b2c5f029adbb4c20f77 (patch)
tree7e62db6f32fd657f35363439e7c46c2856809310 /utils/buildit/GNUmakefile
parent56ff3f15e71cb0baad677b9d1d9f1038b26cf18d (diff)
Add support for a new Apple-style build target, EmbeddedSim, that builds
llvmCore for the iOS Simulator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/buildit/GNUmakefile')
-rw-r--r--utils/buildit/GNUmakefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/buildit/GNUmakefile b/utils/buildit/GNUmakefile
index d17585f8f3..dbdb930ae1 100644
--- a/utils/buildit/GNUmakefile
+++ b/utils/buildit/GNUmakefile
@@ -49,8 +49,9 @@ endif
# Default to not install libLTO.dylib.
INSTALL_LIBLTO := no
-# Default to do a native build, not a cross-build for an ARM host.
+# Default to do a native build, not a cross-build for an ARM host or simulator.
ARM_HOSTED_BUILD := no
+IOS_SIM_BUILD := no
ifndef RC_ProjectSourceVersion
RC_ProjectSourceVersion = 9999
@@ -66,12 +67,19 @@ install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
$(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
$(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
$(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \
- $(ARM_HOSTED_BUILD) \
+ $(ARM_HOSTED_BUILD) $(IOS_SIM_BUILD) \
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
EmbeddedHosted:
$(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr install
+# When building for the iOS simulator, MACOSX_DEPLOYMENT_TARGET is not set
+# by default, but it needs to be set when building tools that run on the host
+# (e.g., tblgen), so set it here.
+EmbeddedSim:
+ export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`; \
+ $(MAKE) IOS_SIM_BUILD=yes PREFIX=/usr install
+
# installhdrs does nothing, because the headers aren't useful until
# the compiler is installed.
installhdrs:
@@ -120,4 +128,4 @@ clean:
$(OBJROOT) $(SYMROOT) $(DSTROOT):
mkdir -p $@
-.PHONY: install installsrc clean EmbeddedHosted
+.PHONY: install installsrc clean EmbeddedHosted EmbeddedSim