X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fbuildit%2FGNUmakefile;h=fc5578a68464e4d13a5299d3e34c2f8c2145aa9c;hb=f8a35ff558cbbfac81b252b3f2de6a6fe42fb12c;hp=0f3b7ebe6bf2aa202b7ed171657c1fcdfe350a16;hpb=7d2552135d2240f95d94c4f252274f4f863a3f5d;p=oota-llvm.git diff --git a/utils/buildit/GNUmakefile b/utils/buildit/GNUmakefile index 0f3b7ebe6bf..fc5578a6846 100644 --- a/utils/buildit/GNUmakefile +++ b/utils/buildit/GNUmakefile @@ -6,7 +6,7 @@ # # You can specify TARGETS=ppc (or i386) on the buildit command line to limit the # build to just one target. The default is for ppc and i386. The compiler -# targetted at this host gets built anyway, but not installed unless it's listed +# targeted at this host gets built anyway, but not installed unless it's listed # in TARGETS. # Include the set of standard Apple makefile definitions. @@ -46,11 +46,9 @@ else LLVM_OPTIMIZED := yes 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 @@ -65,12 +63,23 @@ install: $(OBJROOT) $(SYMROOT) $(DSTROOT) cd $(OBJROOT) && \ $(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \ $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \ - $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \ - $(ARM_HOSTED_BUILD) \ + $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) \ + $(ARM_HOSTED_BUILD) $(IOS_SIM_BUILD) \ $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) EmbeddedHosted: - $(MAKE) ARM_HOSTED_BUILD=yes install + $(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr/local 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=$(SDKROOT)/usr/local install + +Embedded: + ARM_PLATFORM=`xcodebuild -version -sdk iphoneos PlatformPath` && \ + $(MAKE) DSTROOT=$(DSTROOT)$$ARM_PLATFORM/Developer install # installhdrs does nothing, because the headers aren't useful until # the compiler is installed. @@ -120,4 +129,4 @@ clean: $(OBJROOT) $(SYMROOT) $(DSTROOT): mkdir -p $@ -.PHONY: install installsrc clean EmbeddedHosted +.PHONY: install installsrc clean EmbeddedHosted EmbeddedSim Embedded