xamarin-macios/tools/mmp/Makefile

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

2016-04-21 15:57:02 +03:00
TOP=../..
include $(TOP)/Make.config
export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
#
# mmp
#
MMP_CONF=Release
MMP_DIR=bin/$(MMP_CONF)
LOCAL_MMP=$(MMP_DIR)/mmp.exe
LOCAL_MMP_COMMAND=$(SYSTEM_MONO) --debug $(LOCAL_MMP)
# mmp.csproj.inc contains the mmp_dependencies variable used to determine if mmp needs to be rebuilt or not.
2022-08-23 17:28:37 +03:00
mmp.csproj.inc: export BUILD_VERBOSITY=$(MSBUILD_VERBOSITY)
-include mmp.csproj.inc
$(MMP_DIR)/mmp.exe: $(mmp_dependencies)
$(Q_GEN) $(SYSTEM_MSBUILD) "/bl:$@.binlog" $(TOP)/Xamarin.Mac.sln "/t:mmp" $(XBUILD_VERBOSITY) /p:Configuration=$(MMP_CONF)
MMP_TARGETS_DOTNET = \
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native/Microsoft.macOS.registrar.a \
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native/Microsoft.macOS.registrar.a \
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native/Microsoft.macOS.registrar.coreclr.a \
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native/Microsoft.macOS.registrar.coreclr.a \
2016-04-21 15:57:02 +03:00
MMP_TARGETS = \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin/mmp \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp/mmp.exe \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp/Xamarin.Mac.registrar.mobile.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp/Xamarin.Mac.registrar.full.a \
MMP_DIRECTORIES_DOTNET = \
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native \
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native \
MMP_DIRECTORIES = \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp \
$(MMP_DIRECTORIES_DOTNET) \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin/mmp: mmp | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin
$(Q) $(CP) $< $@
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp/mmp.exe: $(MMP_DIR)/mmp.exe | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp
$(Q) $(CP) $(dir $<)/*.exe $(dir $@)
$(Q) $(CP) $(dir $<)/*.dll $(dir $@)
$(Q) $(CP) $(dir $<)/*.pdb $(dir $@)
2016-04-21 15:57:02 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp/Xamarin.Mac.registrar.%.a: Xamarin.Mac.registrar.%.a | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mmp
$(Q) $(CP) $<* $(dir $@)
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native/Microsoft.macOS.registrar.a: Microsoft.macOS.registrar.x86_64.a | $(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native
$(Q) $(CP) $< $@
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native/Microsoft.macOS.registrar.coreclr.a: Microsoft.macOS.registrar.coreclr.x86_64.a | $(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-x64/runtimes/osx-x64/native
$(Q) $(CP) $< $@
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native/Microsoft.macOS.registrar.a: Microsoft.macOS.registrar.arm64.a | $(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native
$(Q) $(CP) $< $@
$(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native/Microsoft.macOS.registrar.coreclr.a: Microsoft.macOS.registrar.coreclr.arm64.a | $(DOTNET_DESTDIR)/Microsoft.macOS.Runtime.osx-arm64/runtimes/osx-arm64/native
$(Q) $(CP) $< $@
$(MMP_DIRECTORIES):
$(Q) mkdir -p $@
2016-04-21 15:57:02 +03:00
#
# Partial static registrar libraries
#
GENERATE_PART_REGISTRAR = $(Q_GEN) $(LOCAL_MMP_COMMAND) --xamarin-framework-directory=$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR) -q --runregistrar:$(abspath $@) --sdkroot $(XCODE_DEVELOPER_ROOT) --sdk $(MACOS_SDK_VERSION) $(abspath $<) --registrar:static --nolink
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
Xamarin.Mac.registrar.mobile.x86_64.m: $(TOP)/src/build/mac/mobile-64/Xamarin.Mac.dll $(LOCAL_MMP)
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
$(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework Xamarin.Mac,Version=v2.0,Profile=Mobile -a:$(MOBILE_BCL_DIR)/mscorlib.dll
$(Q) touch Xamarin.Mac.registrar.mobile.x86_64.m Xamarin.Mac.registrar.mobile.x86_64.h
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
Xamarin.Mac.registrar.mobile.arm64.m: $(TOP)/src/build/mac/mobile-64/Xamarin.Mac.dll $(LOCAL_MMP)
$(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework Xamarin.Mac,Version=v2.0,Profile=Mobile -a:$(MOBILE_BCL_DIR)/mscorlib.dll
$(Q) touch Xamarin.Mac.registrar.mobile.arm64.m Xamarin.Mac.registrar.mobile.arm64.h
Microsoft.macOS.registrar.x86_64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP)
$(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework .NETCoreApp,Version=$(subst net,,$(DOTNET_TFM)),Profile=macos -a:$(DOTNET_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_BCL_DIR)/System.Runtime.InteropServices.dll
$(Q) touch $@ $(basename $@).h
Microsoft.macOS.registrar.coreclr.x86_64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP)
$(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework .NETCoreApp,Version=$(subst net,,$(DOTNET_TFM)),Profile=macos -a:$(DOTNET_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_BCL_DIR)/System.Runtime.InteropServices.dll --xamarin-runtime CoreCLR
$(Q) touch $@ $(basename $@).h
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
Xamarin.Mac.registrar.full.x86_64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac.dll $(LOCAL_MMP)
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
$(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework Xamarin.Mac,Version=v4.5,Profile=Full -a:$(FULL_BCL_DIR)/mscorlib.dll
$(Q) touch Xamarin.Mac.registrar.full.x86_64.m Xamarin.Mac.registrar.full.x86_64.h
Microsoft.macOS.registrar.arm64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP)
$(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework .NETCoreApp,Version=$(subst net,,$(DOTNET_TFM)),Profile=macos -a:$(DOTNET_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_BCL_DIR)/System.Runtime.InteropServices.dll
$(Q) touch $@ $(basename $@).h
Microsoft.macOS.registrar.coreclr.arm64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP)
$(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework .NETCoreApp,Version=$(subst net,,$(DOTNET_TFM)),Profile=macos -a:$(DOTNET_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_BCL_DIR)/System.Runtime.InteropServices.dll --xamarin-runtime CoreCLR
$(Q) touch $@ $(basename $@).h
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
Xamarin.Mac.registrar.full.arm64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac.dll $(LOCAL_MMP)
$(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework Xamarin.Mac,Version=v4.5,Profile=Full -a:$(FULL_BCL_DIR)/mscorlib.dll
$(Q) touch Xamarin.Mac.registrar.full.arm64.m Xamarin.Mac.registrar.full.arm64.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$(TOP)/runtime -mmacosx-version-min=$(MIN_MACOS_SDK_VERSION) -fobjc-runtime=macosx $(EXTRA_DEFINES)
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
%.arm64.a: %.arm64.m
$(Q_CC) $(MAC_CC) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch arm64 $< -Wall -Wno-unguarded-availability-new -I$(TOP)/runtime -mmacosx-version-min=$(MIN_MACOS_SDK_VERSION) -fobjc-runtime=macosx $(EXTRA_DEFINES)
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
Xamarin.Mac.registrar.%.a: Xamarin.Mac.registrar.%.x86_64.a Xamarin.Mac.registrar.%.arm64.a
$(Q_LIPO) $(DEVICE_BIN_PATH)/lipo -create -output $@ $^
dotnet: $(MMP_TARGETS_DOTNET)
ifdef ENABLE_DOTNET
ifdef INCLUDE_MAC
install-local:: $(MMP_TARGETS_DOTNET)
all-local:: $(MMP_TARGETS_DOTNET)
endif
endif
ifdef INCLUDE_XAMARIN_LEGACY
2016-04-25 05:36:52 +03:00
ifdef INCLUDE_MAC
2016-04-21 15:57:02 +03:00
install-local:: $(MMP_TARGETS)
all-local:: $(MMP_TARGETS)
2016-04-25 05:36:52 +03:00
endif
endif
2016-04-21 15:57:02 +03:00
clean-local::
rm -f mmp.stub.c mmp.helper.o
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
rm -rf bin obj
rm -f Xamarin.Mac.registrar.*
$(SYSTEM_MSBUILD) "/t:Clean" /p:Configuration=$(MMP_CONF) *.csproj
2016-04-21 15:57:02 +03:00
include $(TOP)/mk/rules.mk
include ../common/Make.common
# 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.
Xamarin.Mac native Apple Silicon targetting support (#10115) * Add support for Xamarin.Mac arm64 * Add compile product definition task Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures. * Don't reference dynamic objC_send on arm64 When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64. * Fix improper delete/move with already existing directories * Fix stret requirement for Xamarin.Mac in arm64. The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64. * Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app * Re-generalize some mmp registrar rules `Microsoft.macOS.registrar` was missed by the current rule set * Fix mmp tests * Set E7072 as not translated Tests were failing otherwise * Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same) * Fix style issues * Fix `ToLower` usage for invariant usage * Fix xtro-sharpie test
2021-03-18 04:48:02 +03:00
.SECONDARY: $(foreach ext,h m a,Xamarin.Mac.registrar.mobile.x86_64.$(ext) Xamarin.Mac.registrar.mobile.arm64.$(ext) Xamarin.Mac.registrar.full.x86_64.$(ext) Xamarin.Mac.registrar.full.arm64.$(ext))
.SECONDARY: Xamarin.Mac.registrar.mobile.a Xamarin.Mac.registrar.full.a