llvm.org GIT mirror llvm / 273e48b
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 Bob Wilson 9 years ago
3 changed file(s) with 22 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
111111 --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \
112112 cd .. ; \
113113 fi; \
114 ($(MAKE) -C BuildTools \
114 (unset SDKROOT; \
115 $(MAKE) -C BuildTools \
115116 BUILD_DIRS_ONLY=1 \
116117 UNIVERSAL= \
117118 ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
4848 # Default to not install libLTO.dylib.
4949 INSTALL_LIBLTO := no
5050
51 # Default to do a native build, not a cross-build for an ARM host.
51 # Default to do a native build, not a cross-build for an ARM host or simulator.
5252 ARM_HOSTED_BUILD := no
53 IOS_SIM_BUILD := no
5354
5455 ifndef RC_ProjectSourceVersion
5556 RC_ProjectSourceVersion = 9999
6566 $(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
6667 $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
6768 $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \
68 $(ARM_HOSTED_BUILD) \
69 $(ARM_HOSTED_BUILD) $(IOS_SIM_BUILD) \
6970 $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
7071
7172 EmbeddedHosted:
7273 $(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr install
74
75 # When building for the iOS simulator, MACOSX_DEPLOYMENT_TARGET is not set
76 # by default, but it needs to be set when building tools that run on the host
77 # (e.g., tblgen), so set it here.
78 EmbeddedSim:
79 export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`; \
80 $(MAKE) IOS_SIM_BUILD=yes PREFIX=/usr install
7381
7482 # installhdrs does nothing, because the headers aren't useful until
7583 # the compiler is installed.
119127 $(OBJROOT) $(SYMROOT) $(DSTROOT):
120128 mkdir -p $@
121129
122 .PHONY: install installsrc clean EmbeddedHosted
130 .PHONY: install installsrc clean EmbeddedHosted EmbeddedSim
4848 # A yes/no parameter that controls whether to cross-build for an ARM host.
4949 ARM_HOSTED_BUILD="${10}"
5050
51 # A yes/no parameter that controls whether to cross-build for the iOS simulator
52 IOS_SIM_BUILD="${11}"
53
5154 # The version number of the submission, e.g. 1007.
52 LLVM_SUBMIT_VERSION="${11}"
55 LLVM_SUBMIT_VERSION="${12}"
5356
5457 # The subversion number of the submission, e.g. 03.
55 LLVM_SUBMIT_SUBVERSION="${12}"
58 LLVM_SUBMIT_SUBVERSION="${13}"
5659
5760 # The current working directory is where the build will happen. It may already
5861 # contain a partial result of an interrupted build, in which case this script
123126 if [ "$ARM_HOSTED_BUILD" = yes ]; then
124127 configure_opts="--enable-targets=arm --host=arm-apple-darwin10 \
125128 --target=arm-apple-darwin10 --build=i686-apple-darwin10"
129 elif [ "$IOS_SIM_BUILD" = yes ]; then
130 # Use a non-standard "darwin_sim" host triple to trigger a cross-build.
131 configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
132 --build=i686-apple-darwin10"
126133 else
127134 configure_opts="--enable-targets=arm,x86,powerpc,cbe"
128135 fi