diff options
author | Ludovic Henry <luhenry@microsoft.com> | 2018-10-02 00:43:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-02 00:43:46 +0300 |
commit | 0aebe90cac85a171735629a779f44ca04bc90377 (patch) | |
tree | 14cb84a7d88a4d58762624fce3122a64d800fdc5 /sdks | |
parent | 9182bcccc3ded3ea3b00e10771ea81b0ed3fcc8f (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')
-rw-r--r-- | sdks/builds/Makefile | 45 | ||||
-rw-r--r-- | sdks/builds/android.mk | 44 | ||||
-rw-r--r-- | sdks/builds/bcl.mk | 113 | ||||
-rw-r--r-- | sdks/builds/desktop.mk | 12 | ||||
-rw-r--r-- | sdks/builds/ios.mk | 49 | ||||
-rw-r--r-- | sdks/builds/llvm.mk | 19 | ||||
-rw-r--r-- | sdks/builds/runtime.mk | 13 | ||||
-rw-r--r-- | sdks/builds/wasm.mk | 22 | ||||
-rw-r--r-- | sdks/desktop/Makefile | 4 | ||||
-rw-r--r-- | sdks/wasm/Makefile | 4 | ||||
-rw-r--r-- | sdks/wasm/packager.cs | 6 |
11 files changed, 193 insertions, 138 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 diff --git a/sdks/builds/android.mk b/sdks/builds/android.mk index 02d8d3c5fe5..ab8e40f1f76 100644 --- a/sdks/builds/android.mk +++ b/sdks/builds/android.mk @@ -29,9 +29,6 @@ provision-android-$(3)-$(1): $$(ANDROID_TOOLCHAIN_DIR)/$(3)$$(if $(2),/$(2))/.st .PHONY: provision-android provision-android: provision-android-$(3)-$(1) -.PHONY: provision -provision: provision-android-$(3)-$(1) - endef AndroidNDKProvisioningTemplate=$(call AndroidProvisioningTemplate,$(1),,ndk,$(ANDROID_URI)) @@ -141,7 +138,6 @@ _android-$(1)_LDFLAGS= \ -L$$(ANDROID_TOOLCHAIN_DIR)/ndk/platforms/android-$$(ANDROID_SDK_VERSION_$(1))/arch-$(2)/usr/lib _android-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-executables \ --disable-iconv \ @@ -165,6 +161,8 @@ _android-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call RuntimeTemplate,android-$(1),$(4))) +android_TARGETS += android-$(1)-$$(CONFIGURATION) + endef ## android-armeabi-v7a @@ -204,18 +202,19 @@ _android-$(1)_LD=ld _android-$(1)_RANLIB=ranlib _android-$(1)_STRIP=strip +_android-$(1)_CFLAGS= \ + $$(if $$(filter $$(UNAME),Darwin),-mmacosx-version-min=10.9) + _android-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-iconv \ --disable-mono-debugger \ --disable-nls \ + --disable-mcs-build \ --enable-dynamic-btls \ --enable-maintainer-mode \ --enable-monodroid \ --with-mcs-docs=no \ - --with-monodroid \ - --with-profile4_x=no \ --without-ikvm-native \ --disable-crash-reporting @@ -224,11 +223,11 @@ _android-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call RuntimeTemplate,android-$(1))) +android_TARGETS += android-$(1)-$$(CONFIGURATION) + endef -android-host-Darwin_CFLAGS=-mmacosx-version-min=10.9 -$(eval $(call AndroidHostTemplate,host-Darwin)) -$(eval $(call AndroidHostTemplate,host-Linux)) +$(eval $(call AndroidHostTemplate,host-$(UNAME))) ## # Parameters @@ -259,7 +258,6 @@ _android-$(1)_CXXFLAGS= \ -DXAMARIN_PRODUCT_VERSION=0 _android-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-llvm \ --disable-mcs-build \ @@ -276,12 +274,12 @@ _android-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call RuntimeTemplate,android-$(1),$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static))) +android_TARGETS += android-$(1)-$$(CONFIGURATION) + endef -ifneq ($(MXE_PREFIX),) $(eval $(call AndroidHostMxeTemplate,host-mxe-Win32,i686)) $(eval $(call AndroidHostMxeTemplate,host-mxe-Win64,x86_64)) -endif ## # Parameters @@ -315,7 +313,6 @@ _android-$(1)_CXXFLAGS= \ -DXAMARIN_PRODUCT_VERSION=0 _android-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-mcs-build \ --disable-nls \ @@ -325,6 +322,8 @@ _android-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call CrossRuntimeTemplate,android-$(1),$$(if $$(filter $$(UNAME),Darwin),$(2)-apple-darwin10,$$(if $$(filter $$(UNAME),Linux),$(2)-linux-gnu,$$(error "Unknown UNAME='$$(UNAME)'"))),$(3)-linux-android,$(4),$(5),$(6))) +android_TARGETS += android-$(1)-$$(CONFIGURATION) $(5) + endef $(eval $(call AndroidCrossTemplate,cross-arm,i686,armv7,android-armeabi-v7a,llvm-llvm32,armv7-none-linux-androideabi)) @@ -374,7 +373,6 @@ _android-$(1)_LDFLAGS= \ -static-libstdc++ _android-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-mcs-build \ --disable-nls \ @@ -386,9 +384,25 @@ _android-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call CrossRuntimeTemplate,android-$(1),$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static),$(3)-linux-android,$(4),$(5),$(6))) +android_TARGETS += android-$(1)-$$(CONFIGURATION) $(5) + endef $(eval $(call AndroidCrossMXETemplate,cross-arm-win,i686,armv7,android-armeabi-v7a,llvm-llvmwin32,armv7-none-linux-androideabi)) $(eval $(call AndroidCrossMXETemplate,cross-arm64-win,x86_64,aarch64-v8a,android-arm64-v8a,llvm-llvmwin64,aarch64-v8a-linux-android)) $(eval $(call AndroidCrossMXETemplate,cross-x86-win,i686,i686,android-x86,llvm-llvmwin32,i686-none-linux-android)) $(eval $(call AndroidCrossMXETemplate,cross-x86_64-win,x86_64,x86_64,android-x86_64,llvm-llvmwin64,x86_64-none-linux-android)) + +## +# Parameters +# $(1): build profiles +# $(2): test profile +define AndroidBclTemplate + +$$(eval $$(call BclTemplate,android,$(1),$(2))) + +android_TARGETS += android-bcl + +endef + +$(eval $(call AndroidBclTemplate,monodroid monodroid_tools,monodroid)) diff --git a/sdks/builds/bcl.mk b/sdks/builds/bcl.mk index a12fc844b16..1c534d491ca 100644 --- a/sdks/builds/bcl.mk +++ b/sdks/builds/bcl.mk @@ -1,72 +1,59 @@ - -# $(BCL_PROFILES) controls, essentially, which profiles get nunitlite built (maybe more later) -# $(BCL_TEST_PROFILES) controls which profiles get test suites built. Right now it's only nunit-based corlib, System and System.Core. To be expanded. - -ifndef DISABLE_ANDROID -BCL_PROFILES += monodroid -endif - -ifndef DISABLE_IOS -BCL_PROFILES += monotouch -endif - -ifndef DISABLE_DESKTOP -BCL_PROFILES += net_4_x -endif - -ifndef DISABLE_WASM -BCL_PROFILES += wasm -BCL_TEST_PROFILES += wasm -endif - -.stamp-bcl-toolchain: - touch $@ - -bcl-ios_CONFIGURE_FLAGS = \ - --with-monotouch=yes \ - --with-monotouch_tv=yes \ - --with-xammac=yes \ - --with-monotouch_watch=yes - -bcl_CONFIGURE_FLAGS = \ - $(if $(ENABLE_CXX),--enable-cxx) \ - $(if $(DISABLE_DESKTOP),--with-profile4_x=no,--with-profile4_x=yes) \ - $(if $(DISABLE_ANDROID),,--with-monodroid=yes) \ - $(if $(DISABLE_IOS),,$(bcl-ios_CONFIGURE_FLAGS)) \ - $(if $(DISABLE_WASM),,--with-wasm=yes) \ - --with-mcs-docs=no \ - --disable-nls \ - --disable-btls-lib \ - --disable-support-build \ - --disable-boehm +_bcl_CONFIGURE_FLAGS = \ + --disable-boehm \ + --disable-btls-lib \ + --disable-nls \ + --disable-support-build \ + --with-mcs-docs=no .stamp-bcl-configure: $(TOP)/configure mkdir -p $(TOP)/sdks/builds/bcl - cd $(TOP)/sdks/builds/bcl && $(TOP)/configure $(bcl_CONFIGURE_FLAGS) + ./wrap-configure.sh $(TOP)/sdks/builds/bcl $(abspath $<) $(_bcl_CONFIGURE_FLAGS) touch $@ -$(TOP)/sdks/out/bcl/monodroid $(TOP)/sdks/out/bcl/monotouch $(TOP)/sdks/out/bcl/wasm $(TOP)/sdks/out/bcl/net_4_x: - mkdir -p $@ - -build-custom-bcl: - $(MAKE) -C bcl - @for the_profile in $(BCL_PROFILES); do $(MAKE) -C $(TOP)/mcs/tools/nunit-lite PROFILE=$$the_profile; done - @for the_profile in $(BCL_TEST_PROFILES); do \ - $(MAKE) -C $(TOP)/mcs/class/corlib test-local PROFILE=$$the_profile; \ - $(MAKE) -C $(TOP)/mcs/class/System test-local PROFILE=$$the_profile; \ - $(MAKE) -C $(TOP)/mcs/class/System.Core test-local PROFILE=$$the_profile; \ - done - -.PHONY: package-bcl -package-bcl: | $(TOP)/sdks/out/bcl/net_4_x $(TOP)/sdks/out/bcl/monodroid $(TOP)/sdks/out/bcl/monotouch $(TOP)/sdks/out/bcl/wasm - if [ -d $(TOP)/mcs/class/lib/monodroid ]; then cp -R $(TOP)/mcs/class/lib/monodroid/* $(TOP)/sdks/out/bcl/monodroid; fi - if [ -d $(TOP)/mcs/class/lib/monotouch ]; then cp -R $(TOP)/mcs/class/lib/monotouch/* $(TOP)/sdks/out/bcl/monotouch; fi - if [ -d $(TOP)/mcs/class/lib/wasm ]; then cp -R $(TOP)/mcs/class/lib/wasm/* $(TOP)/sdks/out/bcl/wasm; fi - if [ -d $(TOP)/mcs/class/lib/net_4_x ]; then cp -R $(TOP)/mcs/class/lib/net_4_x/* $(TOP)/sdks/out/bcl/net_4_x; fi +.PHONY: build-bcl +build-bcl: .stamp-bcl-configure + $(MAKE) -C bcl -C mono .PHONY: clean-bcl clean-bcl: - rm -rf .stamp-bcl-toolchain .stamp-bcl-configure $(TOP)/sdks/builds/bcl $(TOP)/sdks/out/bcl - -TARGETS += bcl + rm -rf .stamp-bcl-configure $(TOP)/sdks/builds/bcl + +## +# Parameters +# $(1): target +# $(2): build profiles +# $(3): test profiles +define BclTemplate + +.stamp-$(1)-bcl-toolchain: + touch $$@ + +.PHONY: .stamp-$(1)-bcl-configure +.stamp-$(1)-bcl-configure: .stamp-bcl-configure + +.PHONY: setup-custom-$(1)-bcl +setup-custom-$(1)-bcl: + mkdir -p $$(TOP)/sdks/out/$(1)-bcl $$(foreach profile,$(2),$$(TOP)/sdks/out/$(1)-bcl/$$(profile)) + +.PHONY: build-custom-$(1)-bcl +build-custom-$(1)-bcl: build-bcl + $$(MAKE) -C bcl -C runtime all-mcs build_profiles="$(2)" + $$(foreach profile,$(3), \ + $$(MAKE) -C $$(TOP)/mcs/tools/nunit-lite PROFILE=$$(profile); \ + $$(MAKE) -C $$(TOP)/mcs/class/corlib test-local PROFILE=$$(profile); \ + $$(MAKE) -C $$(TOP)/mcs/class/System test-local PROFILE=$$(profile); \ + $$(MAKE) -C $$(TOP)/mcs/class/System.Core test-local PROFILE=$$(profile);) + +.PHONY: package-$(1)-bcl +package-$(1)-bcl: + $$(foreach profile,$(2), \ + cp -R $$(TOP)/mcs/class/lib/$$(profile)/* $$(TOP)/sdks/out/$(1)-bcl/$$(profile);) + +.PHONY: clean-$(1)-bcl +clean-$(1)-bcl: clean-bcl + rm -rf $$(TOP)/sdks/out/$(1)-bcl $$(foreach profile,$(2),$$(TOP)/sdks/out/$(1)-bcl/$$(profile)) + +TARGETS += $(1)-bcl + +endef diff --git a/sdks/builds/desktop.mk b/sdks/builds/desktop.mk index 76d68ba0917..1ea72a58094 100644 --- a/sdks/builds/desktop.mk +++ b/sdks/builds/desktop.mk @@ -13,7 +13,6 @@ define DesktopTemplate _desktop-$(1)_CC=cc _desktop-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-iconv \ --disable-mcs-build \ @@ -29,3 +28,14 @@ $$(eval $$(call RuntimeTemplate,desktop-$(1),$(2))) endef $(eval $(call DesktopTemplate,x86_64,x86_64-apple-darwin17.2.0)) + +## +# Parameters +# $(1): build profiles +define DesktopBclTemplate + +$$(eval $$(call BclTemplate,desktop,$(1),)) + +endef + +$(eval $(call DesktopBclTemplate,net_4_x)) diff --git a/sdks/builds/ios.mk b/sdks/builds/ios.mk index e6308cb55ab..c5e1060d2af 100644 --- a/sdks/builds/ios.mk +++ b/sdks/builds/ios.mk @@ -12,16 +12,6 @@ PLATFORM_BIN=$(XCODE_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin -ios_CPPFLAGS=-DMONOTOUCH=1 - -ios_LDFLAGS= - -COMMON_LDFLAGS=-Wl,-no_weak_imports - -BITCODE_CFLAGS=-fexceptions -BITCODE_LDFLAGS=-framework CoreFoundation -lobjc -lc++ -BITCODE_CONFIGURE_FLAGS=--enable-llvm-runtime --with-bitcode=yes - ## # Device builds # @@ -75,7 +65,7 @@ _ios-$(1)_CXXFLAGS= \ $$(ios-$(1)_BITCODE_MARKER) _ios-$(1)_CPPFLAGS= \ - $$(ios_CPPFLAGS) \ + -DMONOTOUCH=1 \ $$(ios-$(1)_SYSROOT) \ -arch $(3) \ -DSMALL_CONFIG -DDISABLE_POLICY_EVIDENCE=1 -D_XOPEN_SOURCE -DHOST_IOS -DHAVE_LARGE_FILE_SUPPORT=1 \ @@ -87,7 +77,6 @@ _ios-$(1)_LDFLAGS= \ -lobjc -lc++ _ios-$(1)_CONFIGURE_FLAGS = \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-btls \ --disable-executables \ @@ -116,6 +105,8 @@ _ios-$(1)_CONFIGURE_FLAGS = \ $$(eval $$(call RuntimeTemplate,ios-$(1),$(2)-apple-darwin10)) +ios_TARGETS += ios-$(1)-$$(CONFIGURATION) + endef ios_sysroot = -isysroot $(XCODE_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_VERSION).sdk -miphoneos-version-min=$(IOS_VERSION_MIN) @@ -123,8 +114,8 @@ tvos_sysroot = -isysroot $(XCODE_DIR)/Platforms/AppleTVOS.platform/Developer/SDK watchos_sysroot = -isysroot $(XCODE_DIR)/Platforms/WatchOS.platform/Developer/SDKs/WatchOS$(WATCH_VERSION).sdk -mwatchos-version-min=$(WATCHOS_VERSION_MIN) # explicitly disable dtrace, since it requires inline assembly, which is disabled on AppleTV (and mono's configure.ac doesn't know that (yet at least)) -ios-targettv_CONFIGURE_FLAGS = --enable-dtrace=no $(BITCODE_CONFIGURE_FLAGS) --with-monotouch-tv -ios-targetwatch_CONFIGURE_FLAGS = --enable-cooperative-suspend $(BITCODE_CONFIGURE_FLAGS) --with-monotouch-watch +ios-targettv_CONFIGURE_FLAGS = --enable-dtrace=no --enable-llvm-runtime --with-bitcode=yes --with-monotouch-tv +ios-targetwatch_CONFIGURE_FLAGS = --enable-cooperative-suspend --enable-llvm-runtime --with-bitcode=yes --with-monotouch-watch ios-target32_SYSROOT = $(ios_sysroot) ios-target32s_SYSROOT = $(ios_sysroot) @@ -143,8 +134,8 @@ ios-targettv_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm ios-targetwatch_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm ios-targetwatch_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm -ios-targettv_LDFLAGS = -Wl,-bitcode_bundle $(BITCODE_LDFLAGS) -ios-targetwatch_LDFLAGS = -Wl,-bitcode_bundle $(BITCODE_LDFLAGS) +ios-targettv_LDFLAGS = -Wl,-bitcode_bundle -framework CoreFoundation -lobjc -lc++ +ios-targetwatch_LDFLAGS = -Wl,-bitcode_bundle -framework CoreFoundation -lobjc -lc++ ios-targettv_AC_VARS = \ ac_cv_func_system=no \ @@ -205,7 +196,7 @@ _ios-$(1)_CFLAGS= \ -Wl,-application_extension _ios-$(1)_CPPFLAGS= \ - $$(ios_CPPFLAGS) \ + -DMONOTOUCH=1 \ $$(ios-$(1)_SYSROOT) \ -arch $(2) \ -Wl,-application_extension @@ -215,11 +206,7 @@ _ios-$(1)_CXXFLAGS= \ -arch $(2) \ -Wl,-application_extension -_ios-$(1)_LDFLAGS= \ - $$(ios_LDFLAGS) - _ios-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-btls \ --disable-executables \ @@ -243,6 +230,8 @@ _ios-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call RuntimeTemplate,ios-$(1),$(2)-apple-darwin10)) +ios_TARGETS += ios-$(1)-$$(CONFIGURATION) + endef ios_sim_sysroot = -isysroot $(XCODE_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(IOS_VERSION).sdk -mios-simulator-version-min=$(IOS_VERSION_MIN) @@ -324,11 +313,9 @@ _ios-$(1)_CPPFLAGS= \ -DMONOTOUCH=1 _ios-$(1)_LDFLAGS= \ - $$(ios_LDFLAGS) \ -stdlib=libc++ _ios-$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --disable-boehm \ --disable-btls \ --disable-iconv \ @@ -342,6 +329,8 @@ _ios-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call CrossRuntimeTemplate,ios-$(1),$(2)-apple-darwin10,$(3)-darwin,$(4),$(5),$(6))) +ios_TARGETS += ios-$(1)-$$(CONFIGURATION) $(5) + endef $(eval $(call iOSCrossTemplate,cross32,i386,arm,ios-target32,llvm36-llvm32,arm-apple-darwin10)) @@ -350,3 +339,17 @@ ios-crosswatch_CONFIGURE_FLAGS=--enable-cooperative-suspend $(eval $(call iOSCrossTemplate,crosswatch,i386,armv7k-unknown,ios-targetwatch,llvm36-llvm32,armv7k-apple-darwin)) # 64->arm32 cross compiler $(eval $(call iOSCrossTemplate,cross32-64,x86_64,arm,ios-target32,llvm-llvm64,arm-apple-darwin10)) + +## +# Parameters +# $(1): build profiles +# $(2): test profile +define iOSBclTemplate + +$$(eval $$(call BclTemplate,ios,$(1),$(2))) + +ios_TARGETS += ios-bcl + +endef + +$(eval $(call iOSBclTemplate,monotouch monotouch_tv monotouch_watch monotouch_runtime monotouch_tv_runtime monotouch_watch_runtime,monotouch)) diff --git a/sdks/builds/llvm.mk b/sdks/builds/llvm.mk index 9a7323abcae..347572a7db3 100644 --- a/sdks/builds/llvm.mk +++ b/sdks/builds/llvm.mk @@ -23,30 +23,25 @@ $(LLVM36_SRC)/configure: | $(LLVM36_SRC) # $(2): target # $(3): configure script define LLVMProvisionTemplate -ifeq ($$(UNAME),Darwin) _$(1)-$(2)_HASH = $$(shell git -C $$(dir $(3)) rev-parse HEAD) -_$(1)-$(2)_PACKAGE = $(1)-$(2)-$$(_$(1)-$(2)_HASH).tar.gz +_$(1)-$(2)_PACKAGE = $(1)-$(2)-$$(_$(1)-$(2)_HASH)-$$(UNAME).tar.gz _$(1)-$(2)_URL = "http://xamjenkinsartifact.blob.core.windows.net/mono-sdks/$$(_$(1)-$(2)_PACKAGE)" $$(TOP)/sdks/out/$(1)-$(2)/.stamp-download: - curl --location --silent --show-error $$(_$(1)-$(2)_URL) | tar -xvzf - -C $$(TOP)/sdks/out/$(1)-$(2) + curl --location --silent --show-error $$(_$(1)-$(2)_URL) | tar -xvzf - -C $$(dir $$@) touch $$@ .PHONY: download-$(1)-$(2) download-$(1)-$(2): | setup-$(1)-$(2) -$$(MAKE) $$(TOP)/sdks/out/$(1)-$(2)/.stamp-download -.PHONY: pack-$(1)-$(2) -pack-$(1)-$(2): package-$(1)-$(2) - tar -cvzf $$(TOP)/sdks/out/$$(_$(1)-$(2)_PACKAGE) -C $$(TOP)/sdks/out/$(1)-$(2) . - .PHONY: provision-$(1)-$(2) provision-$(1)-$(2): $(3) | download-$(1)-$(2) - $$(if $$(wildcard $$(TOP)/sdks/out/$(1)-$(2)/.stamp-download),,$$(MAKE) pack-$(1)-$(2)) -else -.PHONY: provision-$(1)-$(2) -provision-$(1)-$(2): package-$(1)-$(2) -endif + $$(if $$(wildcard $$(TOP)/sdks/out/$(1)-$(2)/.stamp-download),,$$(MAKE) package-$(1)-$(2)) + +.PHONY: archive-$(1)-$(2) +archive-$(1)-$(2): package-$(1)-$(2) + tar -cvzf $$(TOP)/$$(_$(1)-$(2)_PACKAGE) -C $$(TOP)/sdks/out/$(1)-$(2) . endef $(eval $(call LLVMProvisionTemplate,llvm,llvm32,$(LLVM_SRC)/CMakeLists.txt)) diff --git a/sdks/builds/runtime.mk b/sdks/builds/runtime.mk index 5bb41f76eda..f4758d386d6 100644 --- a/sdks/builds/runtime.mk +++ b/sdks/builds/runtime.mk @@ -25,15 +25,7 @@ # _$(1)_PATH define RuntimeTemplate -_runtime_$(1)_BITNESS=$$(if $$(findstring i686,$(2)),-m32) - -ifeq ($$(_runtime_$(1)_BITNESS),) -_runtime_$(1)_BITNESS=$$(if $$(findstring i386,$(2)),-m32) -endif - -ifeq ($$(_runtime_$(1)_BITNESS),) -_runtime_$(1)_BITNESS=$$(if $$(findstring x86_64,$(2)),-m64) -endif +_runtime_$(1)_BITNESS=$$(if $$(or $$(findstring i686,$(2)),$$(findstring i386,$(2))),-m32,$$(if $$(findstring x86_64,$(2)),-m64)) _runtime_$(1)_CFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)_CFLAGS) $$($(1)_CFLAGS) $$(_runtime_$(1)_BITNESS) _runtime_$(1)_CXXFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)_CXXFLAGS) $$($(1)_CXXFLAGS) $$(_runtime_$(1)_BITNESS) @@ -64,10 +56,10 @@ _runtime_$(1)_CONFIGURE_ENVIRONMENT = \ $$($(1)_CONFIGURE_ENVIRONMENT) _runtime_$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ $$(if $(2),--host=$(2)) \ --cache-file=$$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION).config.cache \ --prefix=$$(TOP)/sdks/out/$(1)-$$(CONFIGURATION) \ + $$(if $$(ENABLE_CXX),--enable-cxx) \ $$(_cross-runtime_$(1)_CONFIGURE_FLAGS) \ $$(_$(1)_CONFIGURE_FLAGS) \ $$($(1)_CONFIGURE_FLAGS) @@ -136,7 +128,6 @@ $(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe: $(wildcard $(TOP)/tools/offs define CrossRuntimeTemplate _cross-runtime_$(1)_CONFIGURE_FLAGS= \ - $(if $(ENABLE_CXX),--enable-cxx) \ --target=$(3) \ --with-cross-offsets=$(3).h \ --with-llvm=$$(TOP)/sdks/out/$(5) diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk index 24d535093f3..fff5b485287 100644 --- a/sdks/builds/wasm.mk +++ b/sdks/builds/wasm.mk @@ -66,6 +66,8 @@ clean-wasm-runtime: TARGETS += wasm-runtime +wasm_TARGETS += wasm-runtime-$(CONFIGURATION) + ## # Parameters # $(1): target @@ -89,6 +91,8 @@ _wasm-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call CrossRuntimeTemplate,wasm-$(1),$$(if $$(filter $$(UNAME),Darwin),$(2)-apple-darwin10,$$(if $$(filter $$(UNAME),Linux),$(2)-linux-gnu,$$(error "Unknown UNAME='$$(UNAME)'"))),$(3)-unknown-none,$(4),$(5),$(6))) +wasm_TARGETS += wasm-$(1)-$$(CONFIGURATION) $(5) + endef ifeq ($(DISABLE_WASM_CROSS),) @@ -149,8 +153,24 @@ _wasm-$(1)_CONFIGURE_FLAGS= \ $$(eval $$(call CrossRuntimeTemplate,wasm-$(1),$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static),$(3)-unknown-none,$(4),$(5),$(6))) +# wasm_TARGETS += wasm-$(1)-$$(CONFIGURATION) + endef ifeq ($(DISABLE_WASM_CROSS),) $(eval $(call WasmCrossMXETemplate,cross-win,i686,wasm32,wasm-runtime,llvm-llvmwin32,wasm32-unknown-unknown)) -endif
\ No newline at end of file +endif + +## +# Parameters +# $(1): build profiles +# $(2): test profile +define WasmBclTemplate + +$$(eval $$(call BclTemplate,wasm,$(1),$(2))) + +wasm_TARGETS += wasm-bcl + +endef + +$(eval $(call WasmBclTemplate,wasm,wasm)) diff --git a/sdks/desktop/Makefile b/sdks/desktop/Makefile index a741d8695eb..bd1f9fb4c5e 100644 --- a/sdks/desktop/Makefile +++ b/sdks/desktop/Makefile @@ -2,12 +2,12 @@ TOP=$(realpath $(CURDIR)/../..) include $(TOP)/sdks/paths.mk run: $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll $(TOP)/sdks/out/desktop-x86_64/bin/mono-sgen - MONO_TESTS_IN_PROGRESS="yes" MONO_PATH="$(CURDIR)/../out/bcl/net_4_x" $(TOP)/sdks/out/desktop-x86_64/bin/mono-sgen --debug $(CURDIR)/../out/bcl/net_4_x/nunit-lite-console.exe $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll -exclude=NotOnMac,MacNotWorking,NotWorking,CAS -format:nunit2 + MONO_TESTS_IN_PROGRESS="yes" MONO_PATH="$(CURDIR)/../out/desktop-bcl/net_4_x" $(TOP)/sdks/out/desktop-x86_64/bin/mono-sgen --debug $(CURDIR)/../out/desktop-bcl/net_4_x/nunit-lite-console.exe $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll -exclude=NotOnMac,MacNotWorking,NotWorking,CAS -format:nunit2 .PHONY: $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll: $(TOP)/mcs/class/lib/net_4_x/tests/net_4_x_Mono.Debugger.Soft_test.dll cp $(TOP)/mcs/class/lib/net_4_x/tests/net_4_x_Mono.Debugger.Soft_test.dll $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll - cp $(TOP)/mcs/class/lib/net_4_x/nunit* $(CURDIR)/../out/bcl/net_4_x + cp $(TOP)/mcs/class/lib/net_4_x/nunit* $(CURDIR)/../out/desktop-bcl/net_4_x .PHONY: $(TOP)/mcs/class/lib/net_4_x/tests/net_4_x_Mono.Debugger.Soft_test.dll $(TOP)/mcs/class/lib/net_4_x/tests/net_4_x_Mono.Debugger.Soft_test.dll: diff --git a/sdks/wasm/Makefile b/sdks/wasm/Makefile index c07219492ac..2239fd4a27d 100644 --- a/sdks/wasm/Makefile +++ b/sdks/wasm/Makefile @@ -16,7 +16,7 @@ DRIVER_CONF=release EMSCRIPTEN_SDKDIR=$(TOP)/sdks/builds/toolchains/emsdk EMCC=source $(TOP)/sdks/builds/toolchains/emsdk/emsdk_env.sh && emcc -WASM_BCL_DIR=$(TOP)/sdks/out/bcl/wasm +WASM_BCL_DIR=$(TOP)/sdks/out/wasm-bcl/wasm MINI_PATH=$(TOP)/mono/mini CSC= MONO_PATH=$(TOP)/mcs/class/lib/build $(TOP)/sdks/builds/bcl/runtime/mono-wrapper $(CSC_LOCATION) CSC_FLAGS := /debug:portable /noconfig /nostdlib /nologo /langversion:latest @@ -193,7 +193,7 @@ package: build build-dbg-proxy build-framework-nuget rm -rf tmp mkdir tmp mkdir tmp/bcl - cp -r $(TOP)/sdks/out/bcl/wasm/* tmp/bcl/ + cp -r $(TOP)/sdks/out/wasm-bcl/wasm/* tmp/bcl/ rm -rf tmp/bcl/bare rm -rf tmp/bcl/secxml rm -rf tmp/bcl/tests diff --git a/sdks/wasm/packager.cs b/sdks/wasm/packager.cs index 41fc6c1c6c6..69d8208f589 100644 --- a/sdks/wasm/packager.cs +++ b/sdks/wasm/packager.cs @@ -214,10 +214,10 @@ class Driver { //are we working from the tree? if (sdkdir != null) { framework_prefix = tool_prefix; //all framework assemblies are currently side built to packager.exe - bcl_prefix = Path.Combine (sdkdir, "bcl/wasm"); - } else if (Directory.Exists (Path.Combine (tool_prefix, "../out/bcl/wasm"))) { + bcl_prefix = Path.Combine (sdkdir, "wasm-bcl/wasm"); + } else if (Directory.Exists (Path.Combine (tool_prefix, "../out/wasm-bcl/wasm"))) { framework_prefix = tool_prefix; //all framework assemblies are currently side built to packager.exe - bcl_prefix = Path.Combine (tool_prefix, "../out/bcl/wasm"); + bcl_prefix = Path.Combine (tool_prefix, "../out/wasm-bcl/wasm"); sdkdir = Path.Combine (tool_prefix, "../out"); } else { framework_prefix = Path.Combine (tool_prefix, "framework"); |