Add configure option to disable building for legacy Xamarin. (#10773)
* Add configure option to disable building for legacy Xamarin.
This can greatly speed up the debug-edit-build cycle when doing .NET
development, since it cuts down the build time in half more or less.
* Bump maccore.
New commits in xamarin/maccore:
* xamarin/maccore@548fa45432 [mlaunch] Disable building mlaunch when not including the legacy Xamarin build. (#2403)
Diff: 0562e08b12..548fa45432
This commit is contained in:
Родитель
54324173d3
Коммит
80ed9d81bc
|
@ -205,6 +205,7 @@ INCLUDE_TVOS=1
|
|||
INCLUDE_MACCATALYST=1
|
||||
INCLUDE_DEVICE=1
|
||||
INCLUDE_DOTNET_WATCHOS=
|
||||
INCLUDE_XAMARIN_LEGACY=1
|
||||
|
||||
# disable source code install by default (it's enabled for CI builds)
|
||||
ENABLE_INSTALL_SOURCE=
|
||||
|
|
|
@ -41,6 +41,9 @@ Usage: configure [options]
|
|||
|
||||
--enable-install-source Enable building of API documentation
|
||||
--disable-install-source Disable building of API documentation.
|
||||
|
||||
--enable-legacy-xamarin Enable building the legacy version of Xamarin.iOS/Xamarin.Mac.
|
||||
--disable-legacy-xamarin Disable building the legacy version of Xamarin.iOS/Xamarin.Mac.
|
||||
EOL
|
||||
}
|
||||
|
||||
|
@ -139,6 +142,14 @@ while test x$1 != x; do
|
|||
echo "ENABLE_INSTALL_SOURCE=" >> "$CONFIGURED_FILE"
|
||||
shift
|
||||
;;
|
||||
--enable-legacy-xamarin)
|
||||
echo "INCLUDE_XAMARIN_LEGACY=1" >> "$CONFIGURED_FILE"
|
||||
shift
|
||||
;;
|
||||
--disable-legacy-xamarin)
|
||||
echo "INCLUDE_XAMARIN_LEGACY=" >> "$CONFIGURED_FILE"
|
||||
shift
|
||||
;;
|
||||
--help|-h)
|
||||
show_help
|
||||
exit 0
|
||||
|
|
|
@ -7,7 +7,7 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho
|
|||
endif
|
||||
|
||||
ifdef ENABLE_XAMARIN
|
||||
NEEDED_MACCORE_VERSION := 0562e08b127898cd0468742dfbf29a52fd013598
|
||||
NEEDED_MACCORE_VERSION := 548fa4543223f4d785a26b6bddaa82b85ae6f3d0
|
||||
NEEDED_MACCORE_BRANCH := main
|
||||
|
||||
MACCORE_DIRECTORY := maccore
|
||||
|
|
|
@ -205,8 +205,11 @@ $$(RUNTIME_$(2)_TARGETS_DIRS):
|
|||
$(Q) mkdir -p $$@
|
||||
|
||||
all-$(2):: $$(RUNTIME_$(2)_TARGETS)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
all-local:: $$(RUNTIME_$(2)_TARGETS)
|
||||
install-local:: $$(RUNTIME_$(2)_TARGETS)
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
|
@ -438,7 +441,9 @@ MAC_LIBS = \
|
|||
# embedding the Mono runtime).
|
||||
#
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
all-local:: $(TARGETS)
|
||||
endif
|
||||
|
||||
define ObjTemplate
|
||||
DYNAMIC_DYLIB$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).dylib.$(1).o)
|
||||
|
@ -547,8 +552,10 @@ $(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/%.h: %.h | $(MAC_DESTDIR)$(XAMARIN_MA
|
|||
$(RUNTIME_MAC_TARGETS_DIRS):
|
||||
$(Q) mkdir -p $@
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
all-local:: $(RUNTIME_MAC_TARGETS)
|
||||
install-local:: $(RUNTIME_MAC_TARGETS)
|
||||
endif
|
||||
|
||||
#
|
||||
# .NET
|
||||
|
|
10
src/Makefile
10
src/Makefile
|
@ -406,10 +406,12 @@ PROJECT_FILES += $(PROJECT_DIR)/xamios.csproj $(PROJECT_DIR)/MonoTouch.NUnitLite
|
|||
all-ios: $(IOS_TARGETS)
|
||||
install-ios: $(IOS_TARGETS)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_IOS
|
||||
INSTALL_TARGETS+=install-ios
|
||||
ALL_TARGETS+=all-ios
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Xamarin.Mac
|
||||
|
@ -624,8 +626,10 @@ MAC_VARIANTS_TARGETS = \
|
|||
$(MAC_BUILD_DIR)/mobile-reference/Xamarin.Mac.dll \
|
||||
$(MAC_BUILD_DIR)/full-reference/Xamarin.Mac.dll \
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
INSTALL_TARGETS+=install-mac
|
||||
ALL_TARGETS+=all-mac
|
||||
endif
|
||||
|
||||
MAC_TARGETS_DIRS += \
|
||||
$(MAC_BUILD_DIR) \
|
||||
|
@ -987,10 +991,12 @@ $(WATCH_TARGETS_DIRS):
|
|||
all-watch: $(WATCH_TARGETS)
|
||||
install-watch: $(WATCH_TARGETS)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_WATCH
|
||||
ALL_TARGETS += all-watch
|
||||
INSTALL_TARGETS += install-watch
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Xamarin.TVOS
|
||||
|
@ -1468,10 +1474,12 @@ $(MACCATALYST_TARGETS_DIRS):
|
|||
all-maccatalyst: $(MACCATALYST_TARGETS)
|
||||
install-maccatalyst: $(MACCATALYST_TARGETS)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_MACCATALYST
|
||||
ALL_TARGETS += all-maccatalyst
|
||||
INSTALL_TARGETS += install-maccatalyst
|
||||
endif
|
||||
endif
|
||||
|
||||
### .NET ###
|
||||
|
||||
|
@ -1522,10 +1530,12 @@ $(TVOS_TARGETS_DIRS):
|
|||
all-tvos: $(TVOS_TARGETS)
|
||||
install-tvos: $(TVOS_TARGETS)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_TVOS
|
||||
ALL_TARGETS += all-tvos
|
||||
INSTALL_TARGETS += install-tvos
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Global targets
|
||||
|
|
|
@ -5,11 +5,13 @@ include $(TOP)/Make.config
|
|||
COLOR_GREEN:=$(shell tput setaf 120 2>/dev/null)
|
||||
COLOR_CLEAR:=$(shell tput sgr0 2>/dev/null)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef ENABLE_XAMARIN
|
||||
ifdef INCLUDE_MAC
|
||||
ENABLE_MLAUNCH=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
DOTNET_PLATFORMS_MOBILE=$(filter-out macOS,$(DOTNET_PLATFORMS))
|
||||
|
||||
|
|
|
@ -71,20 +71,23 @@ Xamarin.Mac.registrar.full.x86_64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac.
|
|||
$(Q) touch Xamarin.Mac.registrar.full.x86_64.m Xamarin.Mac.registrar.full.x86_64.h
|
||||
|
||||
%.x86_64.a: %.x86_64.m
|
||||
$(Q_CC) $(MAC_CC) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch x86_64 $< -Wall -Wno-unguarded-availability-new -I$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -fobjc-runtime=macosx
|
||||
$(Q_CC) $(MAC_CC) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch x86_64 $< -Wall -Wno-unguarded-availability-new -I$(TOP)/runtime -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -fobjc-runtime=macosx
|
||||
|
||||
Xamarin.Mac.registrar.%.a: Xamarin.Mac.registrar.%.x86_64.a
|
||||
$(Q) $(CP) $< $@
|
||||
|
||||
dotnet: $(MMP_TARGETS_DOTNET)
|
||||
ifdef ENABLE_DOTNET
|
||||
MMP_TARGETS += $(MMP_TARGETS_DOTNET)
|
||||
install-local:: $(MMP_TARGETS_DOTNET)
|
||||
all-local:: $(MMP_TARGETS_DOTNET)
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_MAC
|
||||
install-local:: $(MMP_TARGETS)
|
||||
all-local:: $(MMP_TARGETS)
|
||||
endif
|
||||
endif
|
||||
|
||||
clean-local::
|
||||
rm -f mmp.stub.c mmp.helper.o
|
||||
|
|
|
@ -232,10 +232,10 @@ define RunRegistrar
|
|||
$$(Q) touch $$(basename $$@).m $$(basename $$@).h
|
||||
|
||||
%.registrar.$(1).$(2).a: %.registrar.$(1).$(2).m %.registrar.$(1).$(2).h
|
||||
$$(Q_CC) $$(IOS_CC) -DDEBUG -g -gdwarf-2 $(6) -stdlib=libc++ -std=c++14 -x objective-c++ -o $$@ -c $$< -Wall -Wno-unguarded-availability-new -I$(7)
|
||||
$$(Q_CC) $$(IOS_CC) -DDEBUG -g -gdwarf-2 $(6) -stdlib=libc++ -std=c++14 -x objective-c++ -o $$@ -c $$< -Wall -Wno-unguarded-availability-new -I$(7) -I$(TOP)/runtime
|
||||
|
||||
.libs/Microsoft.$(9).registrar.$(10).a: .libs/Microsoft.$(9).registrar.$(10).m .libs/Microsoft.$(9).registrar.$(10).h | .libs
|
||||
$$(Q_CC) $$(IOS_CC) -DDEBUG -g -gdwarf-2 $(6) -stdlib=libc++ -std=c++14 -x objective-c++ -o $$@ -c $$< -Wall -Wno-unguarded-availability-new -I$(7)
|
||||
$$(Q_CC) $$(IOS_CC) -DDEBUG -g -gdwarf-2 $(6) -stdlib=libc++ -std=c++14 -x objective-c++ -o $$@ -c $$< -Wall -Wno-unguarded-availability-new -I$(7) -I$(TOP)/runtime
|
||||
|
||||
# make will automatically consider files created in chained implicit rules as temporary files, and delete them afterwards
|
||||
# marking those files as .SECONDARY will prevent that deletion.
|
||||
|
@ -377,13 +377,16 @@ $(foreach platform,$(DOTNET_PLATFORMS_MTOUCH),$(foreach rid,$(DOTNET_$(platform)
|
|||
|
||||
dotnet: $(TARGETS_DOTNET)
|
||||
ifdef ENABLE_DOTNET
|
||||
TARGETS += $(TARGETS_DOTNET)
|
||||
install-local:: $(TARGETS_DOTNET)
|
||||
all-local:: $(TARGETS_DOTNET)
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_IOS
|
||||
install-local:: $(TARGETS)
|
||||
all-local:: $(TARGETS)
|
||||
endif
|
||||
endif
|
||||
|
||||
install-mtouch: \
|
||||
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/bin/mtouch \
|
||||
|
|
Загрузка…
Ссылка в новой задаче