diff options
author | Zoltan Varga <vargaz@gmail.com> | 2018-08-06 11:21:33 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-08-06 11:21:33 +0300 |
commit | a62bb95b279aa262df93e592d2cea4bba68e256e (patch) | |
tree | 15eccb056e95bc4ff640c807983b122e9905aec0 /sdks | |
parent | 7beff1090ce16fb6ed85db63dcb837647c63e296 (diff) |
[sdks] Switch the 32 bit cross compilers back to the old llvm 3.6, the new version has too many problems. (#9889)
* [sdks] Switch the 32 bit cross compilers back to the old llvm 3.6, the new version has too many problems.
* [sdks] Fix building llvm36.
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/builds/ios.mk | 4 | ||||
-rw-r--r-- | sdks/builds/llvm.mk | 35 |
2 files changed, 28 insertions, 11 deletions
diff --git a/sdks/builds/ios.mk b/sdks/builds/ios.mk index 935573baba7..7dd96701bc0 100644 --- a/sdks/builds/ios.mk +++ b/sdks/builds/ios.mk @@ -386,6 +386,6 @@ endef ios-cross32_CONFIGURE_FLAGS=--build=i386-apple-darwin10 ios-crosswatch_CONFIGURE_FLAGS=--build=i386-apple-darwin10 --enable-cooperative-suspend -$(eval $(call iOSCrossTemplate,cross32,arm,llvm32,arm-darwin,arm-apple-darwin10)) +$(eval $(call iOSCrossTemplate,cross32,arm,llvm36-32,arm-darwin,arm-apple-darwin10)) $(eval $(call iOSCrossTemplate,cross64,aarch64,llvm64,aarch64-darwin,aarch64-apple-darwin10)) -$(eval $(call iOSCrossTemplate,crosswatch,armv7k,llvm32,armv7k-unknown-darwin,armv7k-apple-darwin)) +$(eval $(call iOSCrossTemplate,crosswatch,armv7k,llvm36-32,armv7k-unknown-darwin,armv7k-apple-darwin)) diff --git a/sdks/builds/llvm.mk b/sdks/builds/llvm.mk index f28126a78f9..c71914f4d1f 100644 --- a/sdks/builds/llvm.mk +++ b/sdks/builds/llvm.mk @@ -10,13 +10,24 @@ $(dir $(LLVM_SRC)): mv $(TOP)/llvm/usr64 $(TOP)/sdks/out/ios-llvm64 touch $@ -$(dir $(LLVM_SRC)): +LLVM36_SRC?=$(TOP)/sdks/builds/toolchains/llvm36 + +$(dir $(LLVM36_SRC)): mkdir -p $@ +.stamp-llvm36-download: + $(MAKE) -C $(TOP)/llvm -f build.mk download-llvm36 + $(RM) -r $(TOP)/sdks/out/ios-llvm36-32 + mv $(TOP)/llvm/usr32 $(TOP)/sdks/out/ios-llvm36-32 + touch $@ + ## # Parameters # $(1): target # $(2): arch +# $(3): src dir +# $(4): download stamp +# $(5): llvm version (llvm/llvm36) define LLVMTemplate _llvm-$(1)_CMAKE_ARGS = \ @@ -25,27 +36,29 @@ _llvm-$(1)_CMAKE_ARGS = \ .stamp-llvm-$(1)-toolchain: touch $$@ -.stamp-llvm-$(1)-configure: | $$(dir $(LLVM_SRC)) +.stamp-llvm-$(1)-configure: | $$(dir $(3)) touch $$@ .PHONY: build-custom-llvm-$(1) build-custom-llvm-$(1): .PHONY: package-llvm-$(1) -package-llvm-$(1): | $$(dir $(LLVM_SRC)) +package-llvm-$(1): | $$(dir $(3)) $$(MAKE) -C $$(TOP)/llvm -f build.mk install-llvm \ - LLVM_PATH="$(LLVM_SRC)" \ + LLVM_PATH="$(3)" \ + LLVM36_PATH="$(3)" \ LLVM_BUILD="$$(TOP)/sdks/builds/llvm-$(1)" \ LLVM_PREFIX="$$(TOP)/sdks/out/ios-$(1)" \ - LLVM_CMAKE_ARGS="$$(_llvm-$(1)_CMAKE_ARGS)" + LLVM_CMAKE_ARGS="$$(_llvm-$(1)_CMAKE_ARGS)" \ + LLVM_VERSION="$(5)" .PHONY: download-llvm-$(1) -download-llvm-$(1): .stamp-llvm-download +download-llvm-$(1): $(4) .PHONY: clean-llvm-$(1) clean-llvm-$(1): $$(MAKE) -C $$(TOP)/llvm -f build.mk clean-llvm \ - LLVM_PATH="$(LLVM_SRC)" \ + LLVM_PATH="$(3)" \ LLVM_BUILD="$$(TOP)/sdks/builds/llvm-$(1)" \ LLVM_PREFIX="$$(TOP)/sdks/out/ios-$(1)" @@ -53,9 +66,13 @@ TARGETS += llvm-$(1) endef +# Older llvm version used to target 32 bit platforms (ios 32 bit/watchos) +llvm-llvm36-32_CMAKE_ARGS=-DLLVM_BUILD_32_BITS=On +$(eval $(call LLVMTemplate,llvm36-32,i386,$(LLVM36_SRC),.stamp-llvm36-download,llvm36)) + llvm-llvm32_CMAKE_ARGS=-DLLVM_BUILD_32_BITS=On -$(eval $(call LLVMTemplate,llvm32,i386)) -$(eval $(call LLVMTemplate,llvm64,x86_64)) +$(eval $(call LLVMTemplate,llvm32,i386,$(LLVM_SRC),.stamp-llvm-download,llvm)) +$(eval $(call LLVMTemplate,llvm64,x86_64,$(LLVM_SRC),.stamp-llvm-download,llvm)) ## # Parameters |