xamarin-macios/runtime/Makefile

732 строки
33 KiB
Makefile
Исходник Обычный вид История

2016-04-21 15:19:32 +03:00
TOP=..
include $(TOP)/Make.config
# without this many compiler warnings about unused functions and variables
# in system headers show up.
export CCACHE_CPP2=1
#
# Common
#
SHARED_INC += \
delegates.inc \
SHIPPED_HEADERS += \
xamarin/mono-runtime.h \
xamarin/xamarin.h \
xamarin/main.h \
xamarin/trampolines.h \
xamarin/runtime.h \
xamarin/runtime-generated.h \
2016-04-21 15:19:32 +03:00
SHARED_SOURCES += mono-runtime.m bindings.m bindings-generated.m shared.m runtime.m trampolines.m trampolines-invoke.m xamarin-support.m nsstring-localization.m trampolines-varargs.m
SHARED_I386_SOURCES += trampolines-i386.m trampolines-i386-asm.s trampolines-i386-objc_msgSend.s trampolines-i386-objc_msgSendSuper.s trampolines-i386-objc_msgSend_stret.s trampolines-i386-objc_msgSendSuper_stret.s
SHARED_X86_64_SOURCES += trampolines-x86_64.m trampolines-x86_64-asm.s trampolines-x86_64-objc_msgSend.s trampolines-x86_64-objc_msgSendSuper.s trampolines-x86_64-objc_msgSend_stret.s trampolines-x86_64-objc_msgSendSuper_stret.s
SHARED_ARM64_SOURCES += trampolines-arm64.m trampolines-arm64-asm.s
2016-04-21 15:19:32 +03:00
SHARED_HEADERS += shared.h product.h delegates.h runtime-internal.h $(SHARED_INC) $(SHIPPED_HEADERS) trampolines-internal.h slinked-list.h
SHARED_FILES = $(SHARED_SOURCES) $(SHARED_HEADERS) $(SHARED_I386_SOURCES) $(SHARED_X86_64_SOURCES) $(SHARED_ARM64_SOURCES)
2016-04-21 15:19:32 +03:00
Bump to mono:2019-06 (#6196) * Use the commonly used casing for `MSBuildSDKsPath` property Handle "incorrectly" cased msbuild property names msbuild property names are case insensitive. While generating the custom app.config, in `SetToolsetProperty(..)` we try to update the property if it already exists. But the name lookup was case sensitive, thus causing the lookup to fail, resulting in two entries for the same property name differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`. * [mtouch] Whitelist new Brotli native symbols in Xamarin.Tests.Misc.PublicSymbols test * [mtouch] Better assert in NoLLVMFailuresInWatchOS() test We'd list the "LLVM failed" messages before even though the AOT might've crashed and the list is meaningless. Assert the exit code before that. * [mtouch] Use new LLVM even for 32bit targets See https://github.com/mono/mono/issues/14841 and https://github.com/mono/mono/issues/9621 * [mtouch] Work around slow LLVM in "don't link" test See https://github.com/mono/mono/issues/14843 * Remove useless conditional * Remove LLVM36 from Makefile * [watch4] set right min version for arm64_32 based watch devices (#6307) Fixes the confusion around `libmono-native*` (see for example https://github.com/xamarin/xamarin-macios/commit/ce5ba1e41d526eddd9b61f68fae22a747831e9f2#commitcomment-33834491 ) when building with `MONO_BUILD_FROM_SOURCE=1`. * reflect watchos64_32_version_min change from mono sdk * Move mono hash info to mk/mono.mk so that existing scripts work. * Add Makefile dependency on mono.mk where necessary With https://github.com/xamarin/xamarin-macios/commit/3e7bc29adec8dff3558c284a3050f2db36ea3cf2 the Mono hash was moved from Make.config to mono.mk. We need to add a Makefile dependency on this file wherever Make.config was used to track a Mono dependency. * [tests] Copy mk/mono.mk to the XM test package. * [tests] Update minOS version test after consolidating min watchOS versions everywhere. Fixes this mtouch and mmptest failure: 1) Failed : Xamarin.Tests.ProductTests.MinOSVersion(watchOS,MinwatchOS,WatchOSSimulator,False) Failures Expected: <empty> But was: < "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (mono-runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-generated-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (shared-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-invoke-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (xamarin-support-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (nsstring-localization-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-varargs-debug.arm64_32.o)."... > * [mmp] Fix make clean target It needs an -r to remove directories: ``` rm: bin: is a directory rm: obj: is a directory ``` * Add new xamarin_timezone_get_local_name() to a few more places
2019-07-16 18:24:00 +03:00
EXTRA_DEPENDENCIES = $(SHARED_HEADERS) $(TOP)/Make.config $(TOP)/mk/mono.mk
2016-04-21 15:19:32 +03:00
ifdef INJECT_X86_64_SLICE
X86_64_SLICE=$(abspath $(CURDIR)/x86-64-slice.dylib)
$(X86_64_SLICE): Makefile
2019-09-18 12:00:44 +03:00
$(Q) echo "void xamarin_x86_64_function_for_notarization_workaround_v2 () {}" | $(MAC_CC) -shared -x c -o$@ -
else
X86_64_SLICE=
endif
2016-04-21 15:19:32 +03:00
xamarin/mono-runtime.h: mono-runtime.h.t4 exports.t4
$(Q_GEN) $(TT) $< -o $@
xamarin/runtime-generated.h: runtime-generated.h.t4 delegates.t4
$(Q_GEN) $(TT) $< -o $@
2016-04-21 15:19:32 +03:00
mono-runtime.m: mono-runtime.m.t4 exports.t4
$(Q_GEN) $(TT) $< -o $@
delegates.%: delegates.%.t4 delegates.t4
$(Q_GEN) $(TT) $< -o $@
Delegates.generated.cs: Delegates.cs.t4 delegates.t4
$(Q_GEN) $(TT) $< -o $@
bindings-generator.exe: bindings-generator.cs
$(Q) $(SYSTEM_CSC) $< -out:$@ -debug:full -features:strict
2016-04-21 15:19:32 +03:00
bindings-generated.m: bindings-generator.exe
$(Q_GEN) $(SYSTEM_MONO) --debug $< $@
# our makefiles don't support building the same source file multiple times with different defines,
# so just symlink extension-main.m to another file and compile that instead.
app-main.m watchextension-main.m tvextension-main.m: extension-main.m
2016-04-21 15:19:32 +03:00
$(Q_LN) ln -fs $< $@
#
# MonoTouch defines (used for all MonoTouch platforms: iOS, WatchOS and TVOS)
#
MONOTOUCH_SOURCES = \
monotouch-debug.m \
monotouch-main.m \
MONOTOUCH_HEADERS = \
monotouch-debug.h \
MONOTOUCH_LIBS = \
libextension.a \
libtvextension.a \
2016-04-21 15:19:32 +03:00
libapp.a \
libxamarin.a \
libxamarin-debug.a \
libxamarin.dylib \
libxamarin-debug.dylib \
2016-11-16 21:05:38 +03:00
MONOTOUCH_FRAMEWORKS = \
Xamarin \
Xamarin-debug \
MONOTOUCH_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_SOURCES) $(MONOTOUCH_SOURCES)))
2016-04-21 15:19:32 +03:00
MONOTOUCH_I386_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_I386_SOURCES)))
MONOTOUCH_X86_64_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_X86_64_SOURCES)))
MONOTOUCH_ARM64_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_ARM64_SOURCES)))
2016-04-21 15:19:32 +03:00
MONOTOUCH_X86_SOURCE_STEMS = $(MONOTOUCH_I386_SOURCE_STEMS)
2016-04-21 15:19:32 +03:00
#
# FrameworkTemplate contains the install targets and sets up some variables for frameworks
2016-04-21 15:19:32 +03:00
#
define FrameworkTemplate
2016-04-21 15:19:32 +03:00
$(2)_ARCHITECTURES = $(3)
2016-11-16 21:05:38 +03:00
$(2)_FRAMEWORKS = $(MONOTOUCH_FRAMEWORKS)
2016-04-21 15:19:32 +03:00
RUNTIME_$(2)_TARGETS_DIRS += \
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework \
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework \
RUNTIME_$(2)_TARGETS += \
$$(foreach file,$$($(2)_FRAMEWORKS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/$$(file).framework/$$(file)) \
$$(foreach file,$$($(2)_FRAMEWORKS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/$$(file).framework/Info.plist) \
$$(foreach file,$$($(2)_FRAMEWORKS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/$$(file).framework.dSYM/Contents/Info.plist) \
2016-04-21 15:19:32 +03:00
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework/Xamarin: .libs/$(1)/Xamarin.framework | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework
$(Q) $(CP) $$< $$@
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework/Xamarin-debug: .libs/$(1)/Xamarin-debug.framework | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework
$(Q) $(CP) $$< $$@
2016-11-16 21:05:38 +03:00
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/%.framework/Info.plist: Xamarin.framework-$(1).Info.plist | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/%.framework
2016-11-16 21:05:38 +03:00
$(Q) sed 's/@BUNDLE_EXECUTABLE@/$$*/' $$< > $$@
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework.dSYM/Contents/Info.plist: $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework/Xamarin $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework/Info.plist
$$(Q_GEN) dsymutil -j 4 $$< -o $$(abspath $$(dir $$<)/..)/Xamarin.framework.dSYM
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework.dSYM/Contents/Info.plist: $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework/Xamarin-debug $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework/Info.plist
$$(Q_GEN) dsymutil -j 4 $$< -o $$(abspath $$(dir $$<)/..)/Xamarin-debug.framework.dSYM
.libs/$(1)/Xamarin.framework: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/Xamarin.$$(arch).framework)
$(Q) rm -f $$@
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
$(Q) $(CP) $$^ $$@
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
else
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
endif
2016-04-21 15:19:32 +03:00
.libs/$(1)/Xamarin-debug.framework: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/Xamarin-debug.$$(arch).framework)
$(Q) rm -f $$@
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
$(Q) $(CP) $$^ $$@
else
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
endif
endef
# 1: platform
# 2: variable prefix
# 3: architectures
ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
$(eval $(call FrameworkTemplate,iphoneos,IPHONEOS,armv7 armv7s arm64))
endif
$(eval $(call FrameworkTemplate,iphonesimulator,IOSSIMULATOR,x86 x86_64))
endif
ifdef INCLUDE_WATCH
ifdef INCLUDE_DEVICE
$(eval $(call FrameworkTemplate,watchos,WATCHOS,armv7k arm64_32))
endif
$(eval $(call FrameworkTemplate,watchsimulator,WATCHSIMULATOR,x86))
endif
ifdef INCLUDE_TVOS
ifdef INCLUDE_DEVICE
$(eval $(call FrameworkTemplate,tvos,TVOS,arm64))
endif
$(eval $(call FrameworkTemplate,tvsimulator,TVSIMULATOR,x86_64))
endif
#
# PlatformTemplate contains the install targets and sets up some variables
#
define PlatformTemplate
$(2)_SOURCES = $(MONOTOUCH_SOURCES)
$(2)_HEADERS = $(MONOTOUCH_HEADERS)
$(2)_SOURCE_STEMS = $(MONOTOUCH_SOURCE_STEMS)
$(2)_X86_64_SOURCE_STEMS = $(MONOTOUCH_X86_64_SOURCE_STEMS)
$(2)_I386_SOURCE_STEMS = $(MONOTOUCH_I386_SOURCE_STEMS)
$(2)_ARM64_SOURCE_STEMS = $(MONOTOUCH_ARM64_SOURCE_STEMS)
$(2)_LIBRARIES = $(MONOTOUCH_LIBS)
$(2)_ARCHITECTURES = $(3)
RUNTIME_$(2)_TARGETS_DIRS += \
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib \
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/xamarin \
RUNTIME_$(2)_TARGETS += \
$$(foreach file,$$($(2)_LIBRARIES),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib/$$(file)) \
$(foreach file,$(SHIPPED_HEADERS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/$(file)) \
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib/%.a: .libs/$(1)/%.a | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib
$(Q) install -m 0644 $$< $$@
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib/%.dylib: .libs/$(1)/%.dylib | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib
$$(Q_STRIP) $(DEVICE_BIN_PATH)/bitcode_strip $$< -m -o $$@
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/%.h: %.h | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/xamarin
$(Q) install -m 0644 $$< $$@
2016-04-21 15:19:32 +03:00
$$(RUNTIME_$(2)_TARGETS_DIRS):
$(Q) mkdir -p $$@
all-$(2):: $$(RUNTIME_$(2)_TARGETS)
ifdef INCLUDE_XAMARIN_LEGACY
2016-04-21 15:19:32 +03:00
all-local:: $$(RUNTIME_$(2)_TARGETS)
install-local:: $$(RUNTIME_$(2)_TARGETS)
endif
2016-04-21 15:19:32 +03:00
endef
# 1: platform
2016-04-21 15:19:32 +03:00
# 2: variable prefix
# 3: architectures
2016-04-21 15:19:32 +03:00
ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
$(eval $(call PlatformTemplate,iphoneos,IPHONEOS,armv7 armv7s arm64))
endif
$(eval $(call PlatformTemplate,iphonesimulator,IOSSIMULATOR,x86 x86_64))
endif
ifdef INCLUDE_MACCATALYST
$(eval $(call PlatformTemplate,maccatalyst,MACCATALYST,x86_64))
2016-04-21 15:19:32 +03:00
endif
ifdef INCLUDE_WATCH
ifdef INCLUDE_DEVICE
$(eval $(call PlatformTemplate,watchos,WATCHOS,armv7k arm64_32))
endif
$(eval $(call PlatformTemplate,watchsimulator,WATCHSIMULATOR,x86 x86_64))
2016-04-21 15:19:32 +03:00
endif
ifdef INCLUDE_TVOS
ifdef INCLUDE_DEVICE
$(eval $(call PlatformTemplate,tvos,TVOS,arm64))
endif
$(eval $(call PlatformTemplate,tvsimulator,TVSIMULATOR,x86_64))
2016-04-21 15:19:32 +03:00
endif
#
# LibTemplate we build two different libraries from the same source code,
# libapp.a and libextension.a
2016-04-21 15:19:32 +03:00
#
# They're all built from the same soure file (extension-main.m), but with different defines:
# libextension.a has EXTENSION defined.
2016-04-21 15:19:32 +03:00
#
define LibTemplate
$$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/extension-main.$$(arch).o): EXTRA_DEFINES=-DEXTENSION
$$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/watchextension-main.$$(arch).o): EXTRA_DEFINES=-DWATCH_EXTENSION
$$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/tvextension-main.$$(arch).o): EXTRA_DEFINES=-DTV_EXTENSION
2016-04-21 15:19:32 +03:00
.libs/$(1)/libextension.%.a: .libs/$(1)/extension-main.%.o
$(Q) rm -f $$@
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^
.libs/$(1)/libapp.%.a: .libs/$(1)/app-main.%.o
$(Q) rm -f $$@
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^
.libs/$(1)/libextension.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libextension.$$(arch).a)
$(Q) rm -f $$@
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
.libs/$(1)/libapp.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libapp.$$(arch).a)
$(Q) rm -f $$@
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
.libs/$(1)/libtvextension.%.a: .libs/$(1)/tvextension-main.%.o
$(Q) rm -f $$@
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^
.libs/$(1)/libtvextension.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libtvextension.$$(arch).a)
$(Q) rm -f $$@
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
.libs/$(1)/libxamarin.dylib: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libxamarin.$$(arch).dylib)
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
$(Q) rm -f $$@
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
$(Q) $(CP) $$^ $$@
else
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
endif
$(Q) install_name_tool -id @rpath/libxamarin.dylib $$@
$(Q) install_name_tool -change @rpath/ @rpath/libmonosgen-2.0.dylib $$@
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
.libs/$(1)/libxamarin-debug.dylib: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libxamarin-debug.$$(arch).dylib)
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
$(Q) rm -f $$@
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
$(Q) $(CP) $$^ $$@
else
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
endif
$(Q) install_name_tool -id @rpath/libxamarin-debug.dylib $$@
$(Q) install_name_tool -change @rpath/ @rpath/libmonosgen-2.0.dylib $$@
2016-04-21 15:19:32 +03:00
.SECONDARY: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/app-main.$$(arch).o)
endef
$(eval $(call LibTemplate,iphoneos,IPHONEOS))
$(eval $(call LibTemplate,iphonesimulator,IOSSIMULATOR))
$(eval $(call LibTemplate,maccatalyst,MACCATALYST))
2016-04-21 15:19:32 +03:00
$(eval $(call LibTemplate,watchos,WATCHOS))
$(eval $(call LibTemplate,watchsimulator,WATCHSIMULATOR))
2016-04-21 15:19:32 +03:00
$(eval $(call LibTemplate,tvos,TVOS))
$(eval $(call LibTemplate,tvsimulator,TVSIMULATOR))
2016-04-21 15:19:32 +03:00
#
# LibXamarinTemplate (and LibXamarinArchTemplate) builds libxamarin.a
#
define LibXamarinArchTemplate
.libs/$(1)/libxamarin$(4).$(5).a: $$($(5)_$(1)$(3)_OBJECTS)
$$(Q) rm -f $$@
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar Scru $$@ $$^
$$(call Q_2,RANLIB,[$1]) $(DEVICE_BIN_PATH)/ranlib -no_warning_for_no_symbols -q $$@
2016-04-21 15:19:32 +03:00
endef
define LibXamarinTemplate
$(1)$(3)_COMMON_DYLIB_FLAGS = -lmonosgen-2.0 -Wl,-install_name,libxamarin$(4).dylib -framework Foundation -framework CFNetwork -framework UIKit -lz
$(1)$(3)_COMMON_FRAMEWORK_FLAGS = -framework Mono -Wl,-install_name,@rpath/Xamarin$(4).framework/Xamarin$(4) -framework Foundation -framework CFNetwork -framework UIKit -lz
2016-04-21 15:19:32 +03:00
x86_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).x86.o,$$($(2)_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(4).x86.o,$$($(2)_I386_SOURCE_STEMS))
x86_64_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).x86_64.o,$$($(2)_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(4).x86_64.o,$$($(2)_X86_64_SOURCE_STEMS))
armv7_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7.o,$$($(2)_SOURCE_STEMS))
armv7s_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7s.o,$$($(2)_SOURCE_STEMS))
armv7k_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7k.o,$$($(2)_SOURCE_STEMS))
arm64_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).arm64.o,$$($(2)_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(4).arm64.o,$$($(2)_ARM64_SOURCE_STEMS))
arm64_32_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).arm64_32.o,$$($(2)_SOURCE_STEMS))
2016-04-21 15:19:32 +03:00
$$(foreach arch,$$($(2)_ARCHITECTURES),$$(eval $$(call LibXamarinArchTemplate,$(1),$(2),$(3),$(4),$$(arch))))
.libs/$(1)/libxamarin$(4).a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libxamarin$(4).$$(arch).a)
$(Q) rm -f $$@
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
.libs/$(1)/libxamarin$(4).x86.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).x86.dylib: $$(x86_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).x86_64.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).x86_64.dylib: $$(x86_64_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).armv7.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS) -miphoneos-version-min=8.0
2016-04-21 15:19:32 +03:00
.libs/$(1)/libxamarin$(4).armv7.dylib: $$(armv7_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).armv7s.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS) -miphoneos-version-min=8.0
2016-04-21 15:19:32 +03:00
.libs/$(1)/libxamarin$(4).armv7s.dylib: $$(armv7s_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).arm64.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).arm64.dylib: $$(arm64_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).armv7k.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).armv7k.dylib: $$(armv7k_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).arm64_32.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).arm64_32.dylib: $$(arm64_32_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).x86.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).x86.framework: $$(x86_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).x86_64.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).x86_64.framework: $$(x86_64_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).armv7.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS) -miphoneos-version-min=8.0
.libs/$(1)/Xamarin$(4).armv7.framework: $$(armv7_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).armv7s.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS) -miphoneos-version-min=8.0
.libs/$(1)/Xamarin$(4).armv7s.framework: $$(armv7s_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).arm64.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).arm64.framework: $$(arm64_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).armv7k.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).armv7k.framework: $$(armv7k_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).arm64_32.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).arm64_32.framework: $$(arm64_32_$(1)$(3)_OBJECTS)
2016-04-21 15:19:32 +03:00
endef
$(eval $(call LibXamarinTemplate,iphoneos,IPHONEOS))
$(eval $(call LibXamarinTemplate,iphoneos,IPHONEOS,_DEBUG,-debug))
$(eval $(call LibXamarinTemplate,iphonesimulator,IOSSIMULATOR))
$(eval $(call LibXamarinTemplate,iphonesimulator,IOSSIMULATOR,_DEBUG,-debug))
$(eval $(call LibXamarinTemplate,maccatalyst,MACCATALYST))
$(eval $(call LibXamarinTemplate,maccatalyst,MACCATALYST,_DEBUG,-debug))
2016-04-21 15:19:32 +03:00
$(eval $(call LibXamarinTemplate,watchos,WATCHOS))
$(eval $(call LibXamarinTemplate,watchos,WATCHOS,_DEBUG,-debug))
$(eval $(call LibXamarinTemplate,watchsimulator,WATCHSIMULATOR))
$(eval $(call LibXamarinTemplate,watchsimulator,WATCHSIMULATOR,_DEBUG,-debug))
2016-04-21 15:19:32 +03:00
$(eval $(call LibXamarinTemplate,tvos,TVOS))
$(eval $(call LibXamarinTemplate,tvos,TVOS,_DEBUG,-debug))
$(eval $(call LibXamarinTemplate,tvsimulator,TVSIMULATOR))
$(eval $(call LibXamarinTemplate,tvsimulator,TVSIMULATOR,_DEBUG,-debug))
2016-04-21 15:19:32 +03:00
#
# Xamarin.Mac
#
MAC_ARCHITECTURES = x86_64
2016-04-21 15:19:32 +03:00
CLANG_ARCH = $(addprefix -arch ,$(MAC_ARCHITECTURES))
MAC_CLANG = DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) $(MAC_CC) -mmacosx-version-min=$(MIN_OSX_SDK_VERSION)
2016-04-21 15:19:32 +03:00
MAC_SHIPPED_HEADERS = xamarin/launch.h
2016-04-21 15:19:32 +03:00
MAC_STATIC_CFLAGS = $(MAC_CFLAGS)
2016-04-21 15:19:32 +03:00
MAC_SOURCES = $(SHARED_SOURCES) $(SHARED_X86_64_SOURCES) launcher.m
2016-04-21 15:19:32 +03:00
ALLOWED_UNDEFINED_SYMBOLS = _xamarin_enable_debug _xammac_setup
MAC_LIBS = \
libextension.a \
2016-04-21 15:19:32 +03:00
libxammac.a \
libxammac-debug.a \
libxammac-classic.a \
libxammac-classic-debug.a\
2016-04-21 15:19:32 +03:00
libxammac.dylib \
libxammac-debug.dylib \
libxammac-system.a \
libxammac-system-debug.a \
libxammac-system-classic.a \
libxammac-system-classic-debug.a \
2016-04-21 15:19:32 +03:00
#
# libxammac[-debug].a: (no defines)
# This is linked into the native executable when embedding the Mono runtime.
#
# libxammac[-debug].dylib: -DDYNAMIC_MONO_RUNTIME -DDYLIB
# This is not officially supported. It's used when not wanting to use mmp for
# whatever reason (usually to make build processes easier). There is no good
# reason to keep using it, since mmp now supports creating empty 'shell' apps
# with no assemblies, which the user can fill in as they want.
#
# libxammac-system[-debug].a: -DDYNAMIC_MONO_RUNTIME
# This is used linked into the native executable when using the system Mono (i.e. not)
# embedding the Mono runtime).
#
# libxamarin-coreclr.a:
# This is used when using the CoreCLR runtime instead of Mono.
# CORECLR_RUNTIME is defined for these versions of libxamarin.
#
2016-04-21 15:19:32 +03:00
ifdef INCLUDE_XAMARIN_LEGACY
2016-04-21 15:19:32 +03:00
all-local:: $(TARGETS)
endif
2016-04-21 15:19:32 +03:00
define ObjTemplate
DYNAMIC_DYLIB$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).dylib.$(1).o)
STATIC_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).static.$(1).o)
SYSTEM_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).system.$(1).o)
.libs/mac/%$(3).dylib.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_OBJC_CFLAGS) $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<
2016-04-21 15:19:32 +03:00
.libs/mac/%$(3).dylib.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<
2016-04-21 15:19:32 +03:00
.libs/mac/%$(3).static.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<
2016-04-21 15:19:32 +03:00
.libs/mac/%$(3).static.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<
2016-04-21 15:19:32 +03:00
.libs/mac/%$(3).system.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<
2016-04-21 15:19:32 +03:00
.libs/mac/%$(3).system.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<
2016-04-21 15:19:32 +03:00
.libs/mac/libxammac$(3).$(1).dylib: $$(DYNAMIC_DYLIB$(2)_OBJECTS)
Drop the Xcode 9.4 dependency. (#7044) * Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 * [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib * [tests] Adjust XM tests to XM not having fat dylibs anymore. * [tests] Adjust product tests to some libraries not being fat anymore. * One more test fix.
2019-09-24 14:40:18 +03:00
$$(call Q_2,LD, [mac]) $(MAC_CLANG) -arch $(1) -dynamiclib $$(MAC_LDFLAGS) -Wl,-install_name,libxammac$(3).dylib -o $$@ $$^ $$(addprefix -Xlinker -U -Xlinker ,$$(ALLOWED_UNDEFINED_SYMBOLS))
2016-04-21 15:19:32 +03:00
.libs/mac/libxammac$(3).$(1).a: $$(STATIC_LAUNCHER$(2)_OBJECTS)
$$(call Q_2,LIB, [mac]) xcrun libtool -no_warning_for_no_symbols -static -o $$@ $$^
2016-04-21 15:19:32 +03:00
.libs/mac/libxammac-system$(3).$(1).a: $$(SYSTEM_LAUNCHER$(2)_OBJECTS)
$$(call Q_2,LIB, [mac]) xcrun libtool -no_warning_for_no_symbols -static -o $$@ $$^
2016-04-21 15:19:32 +03:00
endef
Bump to use Xcode 10 beta 1 (#4179) * Bump to use Xcode 10 beta 1 * Update Versions.plist * Add a dependency on Xcode 9.4. * [msbuild] Fix build with Xcode 10 beta 1. (#4182) Many years ago (in Xcode 7 according to code comment) Developer/Platforms/iPhoneOS.platform/Developer/usr disappeared, and we coped by looking at Developer/usr instead (and also the subsequent code to locate the bin directory was based on the location of the usr directory). Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared in Xcode 10 beta 1, but it seems useless (for one it doesn't contain a bin directory), so in order to try to keep things sane don't look for this directory in Xcode 10 and instead go directly for Developer/usr (which is what we've been using as the usr directory for years anyway). Fixes this problem when building apps with Xcode 10 beta 1: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(626,3): error : Could not locate SDK bin directory [/Users/rolf/Projects/TestApp/test-app.csproj] * [runtime] Build 32-bit mac executables using Xcode 9.4. * [mtouch] Work around broken tvOS headers in Xcode 10 beta 1. * [mtouch] Work around build problem with Apple's simd headers in Objective-C++ mode. * Use version-agnostic paths to sdk directories. * [tests][xtro] Add todo files (from unclassified) and adjust ignore files to avoid errors * [macos][security] Re-enable SSL[Get|Set]AlpnProtocols. Fixes #4001 (#4022) * [macos][security] Re-enable SSL[Get}Set]AlpnProtocols. Fixes #4001 This was fixed in macOS 10.13.4 https://github.com/xamarin/xamarin-macios/issues/4001 * [tests][monotouch-tests] Disable a few test cases (one crasher, other failures). Causes to be verified later * [xharness] Fix permission dialog suppression in Xcode 10. * [xharness] Ignore 32-bit macOS tests by default. * [tests] Execute mmp regression tests with Xcode 9.4 since many of them are 32-bit and needs porting to 64-bit. * [mmptest] Ignore 32-bit XM tests if we don't have a 32-bit-capable Xcode. * [registrar] Add workaround for broken headers in Xcode 10 beta 1 (radar 40824697). * [mtouch] Restrict another workaround for an Xcode 10 beta 1 bug to a specific Xcode version to remove it asap. * [tests] Fix some protocol changes (public or not) find by introspection tests * [tests][intro] Fix DefaultCtorAllowed failures * [Intents] Obsolete several Intents classes in watchOS. Several existing Intents classes have been marked as unavailable in watchOS in the headers in Xcode 10 beta 1, and corresponding tests are now failing. So obsolete the managed wrapper types, and fix tests accordingly. * Fix xtro wrt previous Ietents/intro changes * [tests] Minor adjustments to mtouch tests to work with Xcode 10. * [msbuild] Update tests to cope with additional files produced by the Core ML compiler. * [msbuild] Xcode 10 doesn't support building watchOS 1 apps, so show a clear error message explaining it. Also update tests accordingly. * [coreimage] Stub new filters and exclude ?removed? ones from tests * Update GameplayKit and SpriteKit NSSecureCoding _upgrade_ and fix other non-public cases (in tests) * [tests] Ignore some GameKit selectors that don't respond anymore (but seems to be available, at least in header files) * [tests] Fix intro 32bits testing for filters resutls * [msbuild] Slightly change error message to be better English.
2018-06-09 04:45:24 +03:00
$(eval $(call ObjTemplate,x86_64,64,,,64))
$(eval $(call ObjTemplate,x86_64,DEBUG64,-debug,-DDEBUG,64))
2016-04-21 15:19:32 +03:00
$(foreach arch,$(MAC_ARCHITECTURES),.libs/mac/extension-main.$(arch).o): EXTRA_DEFINES=-DEXTENSION
.libs/mac/extension-main.%.o: | .libs/mac
$(Q) rm -f $@
$(call Q_2,CC, [mac]) $(MAC_CLANG) -c -DEXTENSION extension-main.m -arch $* -o $@
.libs/mac/libextension.%.a: .libs/mac/extension-main.%.o
$(Q) rm -f $@
$(call Q_2,AR, [mac]) $(DEVICE_BIN_PATH)/ar cru $@ $^
.libs/mac/libextension.a: $(foreach arch,$(MAC_ARCHITECTURES),.libs/mac/libextension.$(arch).a)
$(Q) rm -f $@
$(call Q_2,LIPO, [mac]) $(DEVICE_BIN_PATH)/lipo $^ -create -output $@
.libs/mac/libxammac-debug.dylib: .libs/mac/libxammac-debug.x86_64.dylib
2016-04-21 15:19:32 +03:00
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxammac.dylib: .libs/mac/libxammac.x86_64.dylib
2016-04-21 15:19:32 +03:00
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxammac-debug.a: .libs/mac/libxammac-debug.x86_64.a
2016-04-21 15:19:32 +03:00
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxammac.a: .libs/mac/libxammac.x86_64.a
2016-04-21 15:19:32 +03:00
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxammac-system-debug.a: .libs/mac/libxammac-system-debug.x86_64.a
2016-04-21 15:19:32 +03:00
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxammac-system.a: .libs/mac/libxammac-system.x86_64.a
2016-04-21 15:19:32 +03:00
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxammac-%.a: $(MACIOS_BINARIES_PATH)/libxammac-%.a | .libs/mac
$(Q) $(CP) $< $@
.libs/mac/libxamarin%.a: .libs/mac/libxamarin%.x86_64.a
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
.libs/mac/libxamarin%.dylib: .libs/mac/libxamarin%.x86_64.dylib
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
2016-04-21 15:19:32 +03:00
RUNTIME_MAC_TARGETS_DIRS += \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono \
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib \
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/xamarin \
2016-04-21 15:19:32 +03:00
RUNTIME_MAC_TARGETS += \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/XamMacLauncher \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/XamMacLauncher \
$(foreach file,$(SHIPPED_HEADERS),$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/$(file)) \
$(foreach file,$(MAC_SHIPPED_HEADERS),$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/$(file)) \
$(foreach file,$(MAC_LIBS),$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib/$(file)) \
2016-04-21 15:19:32 +03:00
# The XamMacLauncher file must exist for VSfM to be able to open XM/Classic projects (so that people can use the migration wizard)
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/XamMacLauncher: | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib
$(Q) touch $@
2016-04-21 15:19:32 +03:00
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib/%: .libs/mac/% | $(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib
$(Q) $(CP) $< $@
2016-04-21 15:19:32 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/XamMacLauncher: | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono
$(Q) ln -sF ../XamMacLauncher $@
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/%.h: %.h | $(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/xamarin
2016-04-21 15:19:32 +03:00
$(Q) install -m 0644 $< $@
$(RUNTIME_MAC_TARGETS_DIRS):
$(Q) mkdir -p $@
ifdef INCLUDE_XAMARIN_LEGACY
2016-04-21 15:19:32 +03:00
all-local:: $(RUNTIME_MAC_TARGETS)
install-local:: $(RUNTIME_MAC_TARGETS)
endif
2016-04-21 15:19:32 +03:00
#
# .NET
#
DOTNET_iOS_LIBRARIES = libapp.a libextension.a
DOTNET_tvOS_LIBRARIES = libtvextension.a
DOTNET_watchOS_LIBRARIES = libextension.a libwatchextension.a
DOTNET_macOS_LIBRARIES = libextension.a
define DotNetLibTemplate
DOTNET_TARGETS += \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet.dylib \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet-debug.dylib \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet.a \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet-debug.a \
$$(foreach lib,$$(DOTNET_$(2)_LIBRARIES),$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/$$(lib)) \
$$(foreach header,$$(SHIPPED_HEADERS),$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/$$(header)) \
DOTNET_TARGET_DIRS += \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/xamarin \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/xamarin/%.h: xamarin/%.h | $(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/xamarin
$$(Q) $$(CP) $$< $$@
endef
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(eval $(call DotNetLibTemplate,$(platform),$(rid)))))
define DotNetCoreClrLibTemplate
DOTNET_TARGETS += \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet-coreclr.a \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet-coreclr-debug.a \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet-coreclr.dylib \
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-dotnet-coreclr-debug.dylib \
endef
$(foreach platform,$(DOTNET_CORECLR_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(eval $(call DotNetCoreClrLibTemplate,$(platform),$(rid)))))
# a few lookup tables, because the data we have is not always in the format we need it
DOTNET_ios_x64_ARCHITECTURES=x86_64
DOTNET_ios_x86_ARCHITECTURES=x86
DOTNET_ios_arm_ARCHITECTURES=armv7 armv7s
DOTNET_ios_arm64_ARCHITECTURES=arm64
DOTNET_tvos_x64_ARCHITECTURES=x86_64
DOTNET_tvos_arm64_ARCHITECTURES=arm64
DOTNET_osx_x64_ARCHITECTURES=x86_64
DOTNET_osx_arm64_ARCHITECTURES=arm64
DOTNET_maccatalyst_x64_ARCHITECTURES=x86_64
DOTNET_maccatalyst_arm64_ARCHITECTURES=arm64
DOTNET_ios_x64_SDK_PLATFORM=iphonesimulator
DOTNET_ios_x86_SDK_PLATFORM=iphonesimulator
DOTNET_ios_arm_SDK_PLATFORM=iphoneos
DOTNET_ios_arm64_SDK_PLATFORM=iphoneos
DOTNET_tvos_x64_SDK_PLATFORM=tvsimulator
DOTNET_tvos_arm64_SDK_PLATFORM=tvos
DOTNET_osx_x64_SDK_PLATFORM=mac
DOTNET_osx_arm64_SDK_PLATFORM=mac
DOTNET_maccatalyst_x64_SDK_PLATFORM=maccatalyst
DOTNET_maccatalyst_arm64_SDK_PLATFORM=maccatalyst
DOTNET_iOS_SDK_PLATFORMS=iphonesimulator iphoneos
DOTNET_tvOS_SDK_PLATFORMS=tvsimulator tvos
DOTNET_macOS_SDK_PLATFORMS=mac
DOTNET_MacCatalyst_SDK_PLATFORMS=maccatalyst
DOTNET_iphonesimulator_DYLIB_FLAGS=-lmonosgen-2.0 -framework UIKit
DOTNET_iphoneos_DYLIB_FLAGS=-lmonosgen-2.0 -framework UIKit
DOTNET_tvsimulator_DYLIB_FLAGS=-lmonosgen-2.0 -framework UIKit
DOTNET_tvos_DYLIB_FLAGS=-lmonosgen-2.0 -framework UIKit
DOTNET_maccatalyst_DYLIB_FLAGS=-lmonosgen-2.0 -framework UIKit
DOTNET_mac_DYLIB_FLAGS=-lcoreclr
#
# DotNetInstallLibTemplate lipos or copies libraries into the destination directories
#
define DotNetInstallLibTemplate
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-%.dylib: $$(foreach arch,$(3),.libs/$(4)/libxamarin-%.$$(arch).dylib) | $(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native
ifeq (1,$$(words $(3)))
$(Q) $(CP) $$^ $$@
else
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
endif
$(Q) install_name_tool -id @rpath/libxamarin-$$*.dylib $$@
$(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/libxamarin-%.a: $$(foreach arch,$(3),.libs/$(4)/libxamarin-%.$$(arch).a) | $(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native
ifeq (1,$$(words $(3)))
$(Q) $(CP) $$^ $$@
else
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
endif
endef
# foreach (var platform in DOTNET_PLATFORMS)
# foreach (var rid in DOTNET_<platform>_RUNTIME_IDENTIFIERS)
# call DotNetInstallLibTemplate (platform, rid, architectures_for_rid, sdk_platform_for_rid)
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(eval $(call DotNetInstallLibTemplate,$(platform),$(rid),$(DOTNET_$(shell echo $(rid) | tr -- - _)_ARCHITECTURES),$(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM)))))
#
# LibXamarinTemplate builds libxamarin.a
#
# The tvOS runtime pack doesn't ship support for bitcode yet, so linking fails. In the meantime, link with the old libmonosgen-2.0.dylib from the mono archive
# https://github.com/dotnet/runtime/issues/48508
DOTNET_tvos_arm64_LIBDIR=$(TOP)/builds/mono-ios-sdk-destdir/ios-libs/tvos
# The runtime pack is different for macOS/Mono (it has '.Mono' at the end), so add a special case here.
DOTNET_osx_x64_LIBDIR=$(TOP)/builds/downloads/microsoft.netcore.app.runtime.mono.osx-x64/$(BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION)/runtimes/osx-x64/native
DOTNET_osx_arm64_LIBDIR=$(TOP)/builds/downloads/microsoft.netcore.app.runtime.mono.osx-arm64/$(BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION)/runtimes/osx-arm64/native
define DotNetLibXamarinTemplate
DOTNET_$(4)_LIBDIR ?= $$(TOP)/builds/downloads/microsoft.netcore.app.runtime.$(3)/$(BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION)/runtimes/$(3)/native
DOTNET_$(4)_DYLIB_FLAGS = $(DOTNET_$(1)_DYLIB_FLAGS) -Wl,-install_name,libxamarin$(7).dylib -framework Foundation -framework CFNetwork -lz -L$(abspath $(DOTNET_$(4)_LIBDIR))
DOTNET_$(4)_$(5)$(6)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(7).$(5).o, $(MONOTOUCH_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(7).$(5).o, $(MONOTOUCH_$(shell echo $(5) | tr a-z A-Z)_SOURCE_STEMS))
.libs/$(1)/libxamarin$(7).$(5).a: $$(DOTNET_$(4)_$(5)$(6)_OBJECTS)
$$(Q) rm -f $$@
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar Scru $$@ $$^
$$(call Q_2,RANLIB,[$1]) $(DEVICE_BIN_PATH)/ranlib -no_warning_for_no_symbols -q $$@
.libs/$(1)/libxamarin$(7).$(5).dylib: EXTRA_FLAGS=$$(DOTNET_$(4)_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(7).$(5).dylib: $$(DOTNET_$(4)_$(5)$(6)_OBJECTS)
endef
# foreach (var platform in DOTNET_PLATFORMS)
# foreach (var rid in DOTNET_<platform>_RUNTIME_IDENTIFIERS))
# foreach (var arch in DOTNET_<rid>_ARCHITECTURES)
# 1 2 3 4 5 6 7
# call DotNetLibXamarinTemplate (platform, SDK_PLATFORM, rid, rid_with_underscores, arch, , "-dotnet")
# call DotNetLibXamarinTemplate (platform, SDK_PLATFORM, rid, rid_with_underscores, arch, _DEBUG, "-dotnet-debug")
# call DotNetLibXamarinTemplate (platform, SDK_PLATFORM, rid, rid_with_underscores, arch, _CORECLR, "-dotnet-coreclr")
# call DotNetLibXamarinTemplate (platform, SDK_PLATFORM, rid, rid_with_underscores, arch, _CORECLR_DEBUG, "-dotnet-coreclr-debug")
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(foreach arch,$(DOTNET_$(shell echo $(rid) | tr -- - _)_ARCHITECTURES),$(eval $(call DotNetLibXamarinTemplate,$(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM),$(shell echo $(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM) | tr a-z A-Z),$(rid),$(shell echo $(rid) | tr -- - _),$(arch),,-dotnet)))))
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(foreach arch,$(DOTNET_$(shell echo $(rid) | tr -- - _)_ARCHITECTURES),$(eval $(call DotNetLibXamarinTemplate,$(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM),$(shell echo $(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM) | tr a-z A-Z),$(rid),$(shell echo $(rid) | tr -- - _),$(arch),_DEBUG,-dotnet-debug)))))
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(foreach arch,$(DOTNET_$(shell echo $(rid) | tr -- - _)_ARCHITECTURES),$(eval $(call DotNetLibXamarinTemplate,$(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM),$(shell echo $(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM) | tr a-z A-Z),$(rid),$(shell echo $(rid) | tr -- - _),$(arch),_CORECLR,-dotnet-coreclr)))))
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(foreach arch,$(DOTNET_$(shell echo $(rid) | tr -- - _)_ARCHITECTURES),$(eval $(call DotNetLibXamarinTemplate,$(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM),$(shell echo $(DOTNET_$(shell echo $(rid) | tr -- - _)_SDK_PLATFORM) | tr a-z A-Z),$(rid),$(shell echo $(rid) | tr -- - _),$(arch),_CORECLR_DEBUG,-dotnet-coreclr-debug)))))
dotnet: $(DOTNET_TARGETS)
$(DOTNET_TARGET_DIRS):
$(Q) mkdir -p $@
ifdef ENABLE_DOTNET
all-local:: $(DOTNET_TARGETS)
install-local:: $(DOTNET_TARGETS)
endif
2016-04-21 15:19:32 +03:00
#
# Common
#
clean-local::
$(Q) rm -f *.o
$(Q) rm -f *.a
$(Q) rm -Rf .libs
$(Q) rm -f xamarin/mono-runtime.h mono-runtime.m delegates.h delegates.inc Delegates.generated.cs
include $(TOP)/mk/rules.mk
.SECONDARY: delegates.h delegates.inc