Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Henry <luhenry@microsoft.com>2018-10-02 00:43:46 +0300
committerGitHub <noreply@github.com>2018-10-02 00:43:46 +0300
commit0aebe90cac85a171735629a779f44ca04bc90377 (patch)
tree14cb84a7d88a4d58762624fce3122a64d800fdc5 /sdks/builds/Makefile
parent9182bcccc3ded3ea3b00e10771ea81b0ed3fcc8f (diff)
[sdks] Create archive targets for pre-building on CI (#10882)
* [sdks] Remove redundant --enable-cxx * [sdks] Shorten `-m32`/`-m64` parameters detection for runtimes * [sdks] Build BCL profiles without configure flags * [sdks] Add BclTemplate to build BCL profiles This is to avoid building all the profiles in a single `sdks/out/bcl` directory which will be shared between android, ios and wasm. * [sdks] Create archive targets for pre-building on CI * [sdks] Use archive-{android,ios,wasm} on CI * [sdks] Run archive-llvm-llvm{,win}{32,64} on CI
Diffstat (limited to 'sdks/builds/Makefile')
-rw-r--r--sdks/builds/Makefile45
1 files changed, 40 insertions, 5 deletions
diff --git a/sdks/builds/Makefile b/sdks/builds/Makefile
index 12be3487afc..9bc479ac68c 100644
--- a/sdks/builds/Makefile
+++ b/sdks/builds/Makefile
@@ -11,6 +11,7 @@ CCACHE:=$(if $(DISABLE_CCACHE),,$(shell which ccache))
NINJA:=$(shell which ninja)
UNAME=$(shell uname)
+
ifneq ($(UNAME),Darwin)
# iOS requires Xcode to be available, and Xcode is only available on macOS
DISABLE_IOS=1
@@ -41,7 +42,20 @@ $(TOP)/configure: $(TOP)/configure.ac $(TOP)/autogen.sh
TARGETS=
+ifndef DISABLE_ANDROID
+android_TARGETS=
+endif
+
+ifndef DISABLE_IOS
+ios_TARGETS=
+endif
+
+ifndef DISABLE_WASM
+wasm_TARGETS=
+endif
+
include runtime.mk
+include bcl.mk
## MXE targets
ifeq ($(and $(DISABLE_ANDROID),$(DISABLE_WASM_CROSS)),)
@@ -52,11 +66,6 @@ endif
## LLVM targets
include llvm.mk
-## BCL targets
-ifndef DISABLE_BCL
-include bcl.mk
-endif
-
## Android targets
ifndef DISABLE_ANDROID
include android.mk
@@ -78,6 +87,32 @@ ifndef DISABLE_WASM
include wasm.mk
endif
+## Archive targets
+
+##
+# Parameters:
+# $(1): target (android, ios, wasm)
+define ArchiveTemplate
+_$(1)_HASH = $$(shell git -C $$(TOP) rev-parse HEAD)
+_$(1)_PACKAGE = $(1)-$$(CONFIGURATION)-$$(_$(1)_HASH)-$$(UNAME).tar.gz
+
+.PHONY: archive-$(1)
+archive-$(1): $$(foreach target,$$(filter $(1)-%,$$(patsubst %-$$(CONFIGURATION),%,$$($(1)_TARGETS))),package-$$(target))
+ tar -cvzf $$(TOP)/$$(_$(1)_PACKAGE) -C $$(TOP)/sdks/out $$(sort $$(foreach target,$$($(1)_TARGETS),$$(or $$(wildcard $$(target)-$$(CONFIGURATION)),$$(target))))
+endef
+
+ifndef DISABLE_ANDROID
+$(eval $(call ArchiveTemplate,android))
+endif
+
+ifndef DISABLE_IOS
+$(eval $(call ArchiveTemplate,ios))
+endif
+
+ifndef DISABLE_WASM
+$(eval $(call ArchiveTemplate,wasm))
+endif
+
## Generic targets
.PHONY: $(foreach target,$(TARGETS),toolchain-$(target))
$(foreach target,$(TARGETS),toolchain-$(target)): toolchain-%: .stamp-%-toolchain