From 813b47c5f6d41e29113a27a55f142cae6dfb7db3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 09:44:47 +0200 Subject: [PATCH 1/9] [tests] Make the copy-dotnet-config rule work with paths with spaces, and copy to the linker test directories as well. --- tests/dotnet/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dotnet/Makefile b/tests/dotnet/Makefile index f87f44591a09..a381ce4e233a 100644 --- a/tests/dotnet/Makefile +++ b/tests/dotnet/Makefile @@ -63,7 +63,7 @@ strip-dotnet: # this target will copy NuGet.config and global.json to the directories that need it for their .NET build to work correctly. copy-dotnet-config: $(TARGETS) - $(Q) for dir in $(shell ls -d $(abspath $(TOP)/tests/*/dotnet)); do \ - $(CP) -c NuGet.config global.json $$dir; \ + $(Q) for dir in $(abspath $(TOP))/tests/*/dotnet $(abspath $(TOP))/tests/linker/*/*/dotnet; do \ + $(CP) -c NuGet.config global.json "$$dir"; \ done $(Q) $(CP) -c NuGet.config global.json $(TOP)/external/Touch.Unit/Touch.Client/dotnet From 3f3698253b1968ace8c6a1754142a0a88081947b Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 09:54:34 +0200 Subject: [PATCH 2/9] [dotnet] Quote the path to the app when launching it. --- .../targets/Microsoft.MacCatalyst.Sdk.targets | 2 +- dotnet/Microsoft.macOS.Sdk/targets/Microsoft.macOS.Sdk.targets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets b/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets index 4680653cb6bf..6cc2e46d0f99 100644 --- a/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets +++ b/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets @@ -4,6 +4,6 @@ open - $(TargetDir)/$(AssemblyName).app --args + "$(TargetDir)/$(AssemblyName).app" --args diff --git a/dotnet/Microsoft.macOS.Sdk/targets/Microsoft.macOS.Sdk.targets b/dotnet/Microsoft.macOS.Sdk/targets/Microsoft.macOS.Sdk.targets index 4680653cb6bf..6cc2e46d0f99 100644 --- a/dotnet/Microsoft.macOS.Sdk/targets/Microsoft.macOS.Sdk.targets +++ b/dotnet/Microsoft.macOS.Sdk/targets/Microsoft.macOS.Sdk.targets @@ -4,6 +4,6 @@ open - $(TargetDir)/$(AssemblyName).app --args + "$(TargetDir)/$(AssemblyName).app" --args From ad50c76a8897a4f2bdbc6e8f72bf266812bfdb82 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 09:31:31 +0200 Subject: [PATCH 3/9] [tests] Add proper .NET project files for dont link, link sdk and link all tests. This includes adding a Mac Catalyst variation as well, and adding helpful Makefile targets for simple execution. This is a partial fix for #10833. --- .../dont link/dotnet/MacCatalyst/Info.plist | 12 +++ .../ios/dont link/dotnet/MacCatalyst/Makefile | 1 + .../dotnet/MacCatalyst/dont link.csproj | 15 +++ .../linker/ios/dont link/dotnet/iOS/Makefile | 4 + .../ios/dont link/dotnet/iOS/dont link.csproj | 49 +--------- .../linker/ios/dont link/dotnet/shared.csproj | 54 +++++++++++ tests/linker/ios/dont link/dotnet/shared.mk | 30 ++++++ .../linker/ios/dont link/dotnet/tvOS/Makefile | 1 + .../dont link/dotnet/tvOS/dont link.csproj | 49 +--------- .../link all/dotnet/MacCatalyst/Info.plist | 12 +++ .../ios/link all/dotnet/MacCatalyst/Makefile | 1 + .../dotnet/MacCatalyst/link all.csproj | 14 +++ tests/linker/ios/link all/dotnet/iOS/Makefile | 4 + .../ios/link all/dotnet/iOS/link all.csproj | 87 +----------------- .../linker/ios/link all/dotnet/shared.csproj | 91 +++++++++++++++++++ tests/linker/ios/link all/dotnet/shared.mk | 30 ++++++ .../linker/ios/link all/dotnet/tvOS/Makefile | 1 + .../ios/link all/dotnet/tvOS/link all.csproj | 88 +----------------- .../link sdk/dotnet/MacCatalyst/Info.plist | 12 +++ .../ios/link sdk/dotnet/MacCatalyst/Makefile | 1 + .../dotnet/MacCatalyst/link sdk.csproj | 14 +++ tests/linker/ios/link sdk/dotnet/iOS/Makefile | 4 + .../ios/link sdk/dotnet/iOS/link sdk.csproj | 81 +---------------- .../linker/ios/link sdk/dotnet/shared.csproj | 86 ++++++++++++++++++ tests/linker/ios/link sdk/dotnet/shared.mk | 30 ++++++ .../linker/ios/link sdk/dotnet/tvOS/Makefile | 1 + .../ios/link sdk/dotnet/tvOS/link sdk.csproj | 81 +---------------- 27 files changed, 435 insertions(+), 418 deletions(-) create mode 100644 tests/linker/ios/dont link/dotnet/MacCatalyst/Info.plist create mode 100644 tests/linker/ios/dont link/dotnet/MacCatalyst/Makefile create mode 100644 tests/linker/ios/dont link/dotnet/MacCatalyst/dont link.csproj create mode 100644 tests/linker/ios/dont link/dotnet/iOS/Makefile create mode 100644 tests/linker/ios/dont link/dotnet/shared.csproj create mode 100644 tests/linker/ios/dont link/dotnet/shared.mk create mode 100644 tests/linker/ios/dont link/dotnet/tvOS/Makefile create mode 100644 tests/linker/ios/link all/dotnet/MacCatalyst/Info.plist create mode 100644 tests/linker/ios/link all/dotnet/MacCatalyst/Makefile create mode 100644 tests/linker/ios/link all/dotnet/MacCatalyst/link all.csproj create mode 100644 tests/linker/ios/link all/dotnet/iOS/Makefile create mode 100644 tests/linker/ios/link all/dotnet/shared.csproj create mode 100644 tests/linker/ios/link all/dotnet/shared.mk create mode 100644 tests/linker/ios/link all/dotnet/tvOS/Makefile create mode 100644 tests/linker/ios/link sdk/dotnet/MacCatalyst/Info.plist create mode 100644 tests/linker/ios/link sdk/dotnet/MacCatalyst/Makefile create mode 100644 tests/linker/ios/link sdk/dotnet/MacCatalyst/link sdk.csproj create mode 100644 tests/linker/ios/link sdk/dotnet/iOS/Makefile create mode 100644 tests/linker/ios/link sdk/dotnet/shared.csproj create mode 100644 tests/linker/ios/link sdk/dotnet/shared.mk create mode 100644 tests/linker/ios/link sdk/dotnet/tvOS/Makefile diff --git a/tests/linker/ios/dont link/dotnet/MacCatalyst/Info.plist b/tests/linker/ios/dont link/dotnet/MacCatalyst/Info.plist new file mode 100644 index 000000000000..fb806689db8e --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/MacCatalyst/Info.plist @@ -0,0 +1,12 @@ + + + + + CFBundleDisplayName + DontLinkTest + CFBundleIdentifier + com.xamarin.dontlink + LSMinimumSystemVersion + 10.15 + + \ No newline at end of file diff --git a/tests/linker/ios/dont link/dotnet/MacCatalyst/Makefile b/tests/linker/ios/dont link/dotnet/MacCatalyst/Makefile new file mode 100644 index 000000000000..110d078f4577 --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/MacCatalyst/Makefile @@ -0,0 +1 @@ +include ../shared.mk diff --git a/tests/linker/ios/dont link/dotnet/MacCatalyst/dont link.csproj b/tests/linker/ios/dont link/dotnet/MacCatalyst/dont link.csproj new file mode 100644 index 000000000000..7dea4ba46f3f --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/MacCatalyst/dont link.csproj @@ -0,0 +1,15 @@ + + + + net6.0-maccatalyst + xamarinios10;$(AssetTargetFallback) + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) + + + + + + + + + diff --git a/tests/linker/ios/dont link/dotnet/iOS/Makefile b/tests/linker/ios/dont link/dotnet/iOS/Makefile new file mode 100644 index 000000000000..f1a4290889e9 --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/iOS/Makefile @@ -0,0 +1,4 @@ +include ../shared.mk + +dev: + $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) /p:RuntimeIdentifier=ios-arm64 diff --git a/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj b/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj index b5f1fcef46cc..d2a9bfb7141b 100644 --- a/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj +++ b/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj @@ -2,56 +2,13 @@ net6.0-ios - iossimulator-x64 - Exe - NET - latest - dontlink - dont link - None xamarinios10;$(AssetTargetFallback) + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) - - - - - - - - + - - - - - - - - - - CommonDontLinkTest.cs - - - - - - - - - - - - - - - - - - - - BoardingPass.pkpass - + diff --git a/tests/linker/ios/dont link/dotnet/shared.csproj b/tests/linker/ios/dont link/dotnet/shared.csproj new file mode 100644 index 000000000000..48d6b6c952ed --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/shared.csproj @@ -0,0 +1,54 @@ + + + + Exe + NET;$(DefineConstants) + latest + dontlink + dont link + None + $(RootTestsDirectory)\linker\ios\dont link + + + + + + + + + + + + + + + + + + + + + CommonDontLinkTest.cs + + + + + + + + + + + + + + + + + + + + BoardingPass.pkpass + + + diff --git a/tests/linker/ios/dont link/dotnet/shared.mk b/tests/linker/ios/dont link/dotnet/shared.mk new file mode 100644 index 000000000000..1a526943e9cb --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/shared.mk @@ -0,0 +1,30 @@ +TOP=../../../../../.. + +include $(TOP)/Make.config +include $(TOP)/mk/colors.mk + +reload: + $(Q) rm -Rf $(TOP)/tests/dotnet/packages + $(Q) $(MAKE) -C $(TOP) -j8 all + $(Q) $(MAKE) -C $(TOP) -j8 install + $(Q) git clean -xfdq + +prepare: + $(Q) $(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config + +reload-and-build: + $(Q) $(MAKE) reload + $(Q) $(MAKE) build + +reload-and-run: + $(Q) $(MAKE) reload + $(Q) $(MAKE) run + +build: prepare + $(DOTNET6) build /bl:$@.binlog *.csproj $(MSBUILD_VERBOSITY) + +run: prepare + $(DOTNET6) build /bl:$@.binlog *.csproj /v:diag -t:Run + +diag: + $(DOTNET6) build /v:diag msbuild.binlog diff --git a/tests/linker/ios/dont link/dotnet/tvOS/Makefile b/tests/linker/ios/dont link/dotnet/tvOS/Makefile new file mode 100644 index 000000000000..110d078f4577 --- /dev/null +++ b/tests/linker/ios/dont link/dotnet/tvOS/Makefile @@ -0,0 +1 @@ +include ../shared.mk diff --git a/tests/linker/ios/dont link/dotnet/tvOS/dont link.csproj b/tests/linker/ios/dont link/dotnet/tvOS/dont link.csproj index 482ebc21622b..63cb22a4e2a7 100644 --- a/tests/linker/ios/dont link/dotnet/tvOS/dont link.csproj +++ b/tests/linker/ios/dont link/dotnet/tvOS/dont link.csproj @@ -2,56 +2,13 @@ net6.0-tvos - tvossimulator-x64 - Exe - NET - latest - dontlink - dont link - None xamarintvos10;$(AssetTargetFallback) + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) - - - - - - - - + - - - - - - - - - - CommonDontLinkTest.cs - - - - - - - - - - - - - - - - - - - - BoardingPass.pkpass - + diff --git a/tests/linker/ios/link all/dotnet/MacCatalyst/Info.plist b/tests/linker/ios/link all/dotnet/MacCatalyst/Info.plist new file mode 100644 index 000000000000..58c722337c4e --- /dev/null +++ b/tests/linker/ios/link all/dotnet/MacCatalyst/Info.plist @@ -0,0 +1,12 @@ + + + + + CFBundleDisplayName + LinkAll + CFBundleIdentifier + com.xamarin.linkall + LSMinimumSystemVersion + 10.15 + + diff --git a/tests/linker/ios/link all/dotnet/MacCatalyst/Makefile b/tests/linker/ios/link all/dotnet/MacCatalyst/Makefile new file mode 100644 index 000000000000..110d078f4577 --- /dev/null +++ b/tests/linker/ios/link all/dotnet/MacCatalyst/Makefile @@ -0,0 +1 @@ +include ../shared.mk diff --git a/tests/linker/ios/link all/dotnet/MacCatalyst/link all.csproj b/tests/linker/ios/link all/dotnet/MacCatalyst/link all.csproj new file mode 100644 index 000000000000..240f09aa126a --- /dev/null +++ b/tests/linker/ios/link all/dotnet/MacCatalyst/link all.csproj @@ -0,0 +1,14 @@ + + + + net6.0-maccatalyst + xamarinios10;$(AssetTargetFallback) + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) + + + + + + + + diff --git a/tests/linker/ios/link all/dotnet/iOS/Makefile b/tests/linker/ios/link all/dotnet/iOS/Makefile new file mode 100644 index 000000000000..f1a4290889e9 --- /dev/null +++ b/tests/linker/ios/link all/dotnet/iOS/Makefile @@ -0,0 +1,4 @@ +include ../shared.mk + +dev: + $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) /p:RuntimeIdentifier=ios-arm64 diff --git a/tests/linker/ios/link all/dotnet/iOS/link all.csproj b/tests/linker/ios/link all/dotnet/iOS/link all.csproj index 4a8514e3a8d4..dbce4fd288d9 100644 --- a/tests/linker/ios/link all/dotnet/iOS/link all.csproj +++ b/tests/linker/ios/link all/dotnet/iOS/link all.csproj @@ -2,96 +2,13 @@ net6.0-ios - iossimulator-x64 - Exe - NET;$(DefineConstants) - latest - linkall - link all - Full xamarinios10;$(AssetTargetFallback) - true - --optimize=all,-remove-dynamic-registrar,-force-rejected-types-removal + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) - - - true - DEBUG;$(DefineConstants) - - - true - + - - ../../support.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - OptimizeGeneratedCodeTest.cs - - - - - - - - - ReflectionTest.cs - - - - - TestRuntime.cs - - - CommonLinkAllTest.cs - - - CommonLinkAnyTest.cs - - - NetworkResources.cs - - - - - - - - - - - - - - - - diff --git a/tests/linker/ios/link all/dotnet/shared.csproj b/tests/linker/ios/link all/dotnet/shared.csproj new file mode 100644 index 000000000000..5ee15d30c2a8 --- /dev/null +++ b/tests/linker/ios/link all/dotnet/shared.csproj @@ -0,0 +1,91 @@ + + + + Exe + NET;$(DefineConstants) + latest + linkall + link all + Full + --optimize=all,-remove-dynamic-registrar,-force-rejected-types-removal + true + $(RootTestsDirectory)\linker\ios\link all + + + + + true + DEBUG;$(DefineConstants) + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OptimizeGeneratedCodeTest.cs + + + + + + + + + ReflectionTest.cs + + + + + TestRuntime.cs + + + CommonLinkAllTest.cs + + + CommonLinkAnyTest.cs + + + NetworkResources.cs + + + + + + + + + + + + + + + + + + diff --git a/tests/linker/ios/link all/dotnet/shared.mk b/tests/linker/ios/link all/dotnet/shared.mk new file mode 100644 index 000000000000..1a526943e9cb --- /dev/null +++ b/tests/linker/ios/link all/dotnet/shared.mk @@ -0,0 +1,30 @@ +TOP=../../../../../.. + +include $(TOP)/Make.config +include $(TOP)/mk/colors.mk + +reload: + $(Q) rm -Rf $(TOP)/tests/dotnet/packages + $(Q) $(MAKE) -C $(TOP) -j8 all + $(Q) $(MAKE) -C $(TOP) -j8 install + $(Q) git clean -xfdq + +prepare: + $(Q) $(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config + +reload-and-build: + $(Q) $(MAKE) reload + $(Q) $(MAKE) build + +reload-and-run: + $(Q) $(MAKE) reload + $(Q) $(MAKE) run + +build: prepare + $(DOTNET6) build /bl:$@.binlog *.csproj $(MSBUILD_VERBOSITY) + +run: prepare + $(DOTNET6) build /bl:$@.binlog *.csproj /v:diag -t:Run + +diag: + $(DOTNET6) build /v:diag msbuild.binlog diff --git a/tests/linker/ios/link all/dotnet/tvOS/Makefile b/tests/linker/ios/link all/dotnet/tvOS/Makefile new file mode 100644 index 000000000000..110d078f4577 --- /dev/null +++ b/tests/linker/ios/link all/dotnet/tvOS/Makefile @@ -0,0 +1 @@ +include ../shared.mk diff --git a/tests/linker/ios/link all/dotnet/tvOS/link all.csproj b/tests/linker/ios/link all/dotnet/tvOS/link all.csproj index eb288beb1b1a..5f743d5f93d4 100644 --- a/tests/linker/ios/link all/dotnet/tvOS/link all.csproj +++ b/tests/linker/ios/link all/dotnet/tvOS/link all.csproj @@ -2,96 +2,14 @@ net6.0-tvos - tvossimulator-x64 - Exe - NET;XAMCORE_3_0;$(DefineConstants) - latest - linkall - link all - Full + XAMCORE_3_0;$(DefineConstants) xamarintvos10;$(AssetTargetFallback) - true - --optimize=all,-remove-dynamic-registrar,-force-rejected-types-removal + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) - - - true - DEBUG;$(DefineConstants) - - - true - + - - ../../support.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - OptimizeGeneratedCodeTest.cs - - - - - - - - - ReflectionTest.cs - - - - - TestRuntime.cs - - - CommonLinkAllTest.cs - - - CommonLinkAnyTest.cs - - - NetworkResources.cs - - - - - - - - - - - - - - - - diff --git a/tests/linker/ios/link sdk/dotnet/MacCatalyst/Info.plist b/tests/linker/ios/link sdk/dotnet/MacCatalyst/Info.plist new file mode 100644 index 000000000000..1feac114bfcb --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/MacCatalyst/Info.plist @@ -0,0 +1,12 @@ + + + + + CFBundleDisplayName + LinkSdkTest + CFBundleIdentifier + com.xamarin.linksdk + LSMinimumSystemVersion + 10.15 + + diff --git a/tests/linker/ios/link sdk/dotnet/MacCatalyst/Makefile b/tests/linker/ios/link sdk/dotnet/MacCatalyst/Makefile new file mode 100644 index 000000000000..110d078f4577 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/MacCatalyst/Makefile @@ -0,0 +1 @@ +include ../shared.mk diff --git a/tests/linker/ios/link sdk/dotnet/MacCatalyst/link sdk.csproj b/tests/linker/ios/link sdk/dotnet/MacCatalyst/link sdk.csproj new file mode 100644 index 000000000000..a705ff04d5a3 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/MacCatalyst/link sdk.csproj @@ -0,0 +1,14 @@ + + + + net6.0-maccatalyst + xamarinios10;$(AssetTargetFallback) + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) + + + + + + + + diff --git a/tests/linker/ios/link sdk/dotnet/iOS/Makefile b/tests/linker/ios/link sdk/dotnet/iOS/Makefile new file mode 100644 index 000000000000..f1a4290889e9 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/iOS/Makefile @@ -0,0 +1,4 @@ +include ../shared.mk + +dev: + $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) /p:RuntimeIdentifier=ios-arm64 diff --git a/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj b/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj index 28c09fd54377..c1d88e181d63 100644 --- a/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj +++ b/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj @@ -2,88 +2,13 @@ net6.0-ios - iossimulator-x64 - Exe - NET - latest - linksdk - link sdk - SdkOnly - true xamarinios10;$(AssetTargetFallback) - -disable-thread-check "--dlsym:-link sdk" -gcc_flags="-UhoItsB0rken" - ..\..\..\..\.. + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) - - - ../../support.dll - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - TestRuntime.cs - - - ILReader.cs - - - CommonLinkSdkTest.cs - - - CommonLinkAnyTest.cs - - - - NetworkResources.cs - - - - - - - - - - - - - - - - + diff --git a/tests/linker/ios/link sdk/dotnet/shared.csproj b/tests/linker/ios/link sdk/dotnet/shared.csproj new file mode 100644 index 000000000000..fa6b4e8ca2d5 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/shared.csproj @@ -0,0 +1,86 @@ + + + + Exe + NET;$(DefineConstants) + latest + linksdk + link sdk + SdkOnly + -disable-thread-check "--dlsym:-link sdk" -gcc_flags="-UhoItsB0rken" + true + $(RootTestsDirectory)\linker\ios\link sdk + + + + + $(ThisTestDirectory)/support.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TestRuntime.cs + + + ILReader.cs + + + CommonLinkSdkTest.cs + + + CommonLinkAnyTest.cs + + + + NetworkResources.cs + + + + + + + + + + + + + + + + + + diff --git a/tests/linker/ios/link sdk/dotnet/shared.mk b/tests/linker/ios/link sdk/dotnet/shared.mk new file mode 100644 index 000000000000..1a526943e9cb --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/shared.mk @@ -0,0 +1,30 @@ +TOP=../../../../../.. + +include $(TOP)/Make.config +include $(TOP)/mk/colors.mk + +reload: + $(Q) rm -Rf $(TOP)/tests/dotnet/packages + $(Q) $(MAKE) -C $(TOP) -j8 all + $(Q) $(MAKE) -C $(TOP) -j8 install + $(Q) git clean -xfdq + +prepare: + $(Q) $(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config + +reload-and-build: + $(Q) $(MAKE) reload + $(Q) $(MAKE) build + +reload-and-run: + $(Q) $(MAKE) reload + $(Q) $(MAKE) run + +build: prepare + $(DOTNET6) build /bl:$@.binlog *.csproj $(MSBUILD_VERBOSITY) + +run: prepare + $(DOTNET6) build /bl:$@.binlog *.csproj /v:diag -t:Run + +diag: + $(DOTNET6) build /v:diag msbuild.binlog diff --git a/tests/linker/ios/link sdk/dotnet/tvOS/Makefile b/tests/linker/ios/link sdk/dotnet/tvOS/Makefile new file mode 100644 index 000000000000..110d078f4577 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/tvOS/Makefile @@ -0,0 +1 @@ +include ../shared.mk diff --git a/tests/linker/ios/link sdk/dotnet/tvOS/link sdk.csproj b/tests/linker/ios/link sdk/dotnet/tvOS/link sdk.csproj index f17c7c90dd5d..a2d4d65a1680 100644 --- a/tests/linker/ios/link sdk/dotnet/tvOS/link sdk.csproj +++ b/tests/linker/ios/link sdk/dotnet/tvOS/link sdk.csproj @@ -2,88 +2,13 @@ net6.0-tvos - tvossimulator-x64 - Exe - NET - latest - linksdk - link sdk - SdkOnly - true xamarintvos10;$(AssetTargetFallback) - -disable-thread-check "--dlsym:-link sdk" -gcc_flags="-UhoItsB0rken" - ..\..\..\..\.. + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..\..')) - - - ../../support.dll - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - TestRuntime.cs - - - ILReader.cs - - - CommonLinkSdkTest.cs - - - CommonLinkAnyTest.cs - - - - NetworkResources.cs - - - - - - - - - - - - - - - - + From 56baf35c79c37b4703a2db20e79741c1879dbe55 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 12:25:52 +0200 Subject: [PATCH 4/9] [tests] Adjust 'link all' to work on Mac Catalyst. --- tests/linker/ios/link all/LinkAllTest.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/linker/ios/link all/LinkAllTest.cs b/tests/linker/ios/link all/LinkAllTest.cs index 5aaaf30162f0..8e6039ee02e3 100644 --- a/tests/linker/ios/link all/LinkAllTest.cs +++ b/tests/linker/ios/link all/LinkAllTest.cs @@ -60,7 +60,10 @@ public void UnusedMethod () {} // we want the tests to be available because we use the linker [Preserve (AllMembers = true)] public class LinkAllRegressionTest { -#if __IOS__ +#if __MACCATALYST__ + public const string NamespacePrefix = ""; + public const string AssemblyName = "Xamarin.MacCatalyst"; +#elif __IOS__ public const string NamespacePrefix = ""; public const string AssemblyName = "Xamarin.iOS"; #elif __TVOS__ @@ -211,7 +214,8 @@ public void DetectPlatform () { #if !__WATCHOS__ // for (future) nunit[lite] platform detection - if this test fails then platform detection won't work - Assert.NotNull (Helper.GetType (NamespacePrefix + "UIKit.UIApplicationDelegate, " + AssemblyName), "UIApplicationDelegate"); + var typename = NamespacePrefix + "UIKit.UIApplicationDelegate, " + AssemblyName; + Assert.NotNull (Helper.GetType (typename), typename); #endif #if NET Assert.Null (Helper.GetType ("Mono.Runtime"), "Mono.Runtime"); From 82b1331210550fbd33954cc13513ecaaf4d9fa6a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 12:27:13 +0200 Subject: [PATCH 5/9] [xharness] Rewrite the 'RootTestsDirectory' property when cloning a project. --- tests/xharness/TestProject.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/xharness/TestProject.cs b/tests/xharness/TestProject.cs index 24b42a5b644e..f1cc804be473 100644 --- a/tests/xharness/TestProject.cs +++ b/tests/xharness/TestProject.cs @@ -98,6 +98,11 @@ async Task CreateCopyAsync (ILog log, IProcessManager processManager, ITestTask var original_name = System.IO.Path.GetFileName (original_path); doc.ResolveAllPaths (original_path, rootDirectory); + // Replace RootTestsDirectory with a constant value, so that any relative paths don't end up wrong. + var rootTestsDirectoryNode = doc.SelectSingleNode ("/Project/PropertyGroup/RootTestsDirectory"); + if (rootTestsDirectoryNode != null) + rootTestsDirectoryNode.InnerText = rootDirectory; + if (doc.IsDotNetProject ()) { if (test.ProjectPlatform == "iPhone") { switch (test.Platform) { From b890b2b248f3b13e9afd1f4a2427a66cc48dbc86 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 12:27:35 +0200 Subject: [PATCH 6/9] [xharness] Add .NET/Mac Catalyst versions of dont link, link sdk and link all. --- tests/xharness/Harness.cs | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index 714db67e50a9..6930288770ce 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -308,6 +308,30 @@ int AutoConfigureMac (bool generate_projects) Ignore = !ENABLE_DOTNET, }); + MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dotnet", "MacCatalyst", "dont link.csproj"))) { + Name = "dont link", + IsDotNetProject = true, + TargetFrameworkFlavors = MacFlavors.MacCatalyst, + Platform = "AnyCPU", + Ignore = !ENABLE_DOTNET, + }); + + MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "dotnet", "MacCatalyst", "link all.csproj"))) { + Name = "link all", + IsDotNetProject = true, + TargetFrameworkFlavors = MacFlavors.MacCatalyst, + Platform = "AnyCPU", + Ignore = !ENABLE_DOTNET, + }); + + MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link sdk", "dotnet", "MacCatalyst", "link sdk.csproj"))) { + Name = "link sdk", + IsDotNetProject = true, + TargetFrameworkFlavors = MacFlavors.MacCatalyst, + Platform = "AnyCPU", + Ignore = !ENABLE_DOTNET, + }); + foreach (var flavor in new MonoNativeFlavor [] { MonoNativeFlavor.Compat, MonoNativeFlavor.Unified }) { var monoNativeInfo = new MonoNativeInfo (DevicePlatform.macOS, flavor, RootDirectory, Log); var macTestProject = new MacTestProject (monoNativeInfo.ProjectPath, targetFrameworkFlavor: MacFlavors.Modern | MacFlavors.Full) { @@ -430,19 +454,19 @@ void AutoConfigureIOS () Configurations = new string [] { "Debug", "Release" }, IgnoreMacCatalystVariation = false, }); - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dotnet", "iOS", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true }); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dotnet", "iOS", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, SkipMacCatalystVariation = true }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dotnet", "tvOS", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IgnoreMacCatalystVariation = false, }); - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "dotnet", "iOS", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true }); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "dotnet", "iOS", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, SkipMacCatalystVariation = true, }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "dotnet", "tvOS", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link sdk", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IgnoreMacCatalystVariation = false, }); - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link sdk", "dotnet", "iOS", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true }); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link sdk", "dotnet", "iOS", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, SkipMacCatalystVariation = true, }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link sdk", "dotnet", "tvOS", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, }); foreach (var flavor in new MonoNativeFlavor [] { MonoNativeFlavor.Compat, MonoNativeFlavor.Unified }) { From c7fe2fefd59d2b479be7ae0d961227d9a99e2363 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 12:38:19 +0200 Subject: [PATCH 7/9] [link sdk] Adjust the Bug2000_NSPersistentStoreCoordinator test to create file in a temporary directory. It would create a file in the current directory, which is the root directory of the app bundle. This would work in the simulator (because the directory is read-write), fail on device (because the directory is read-only), and cause rebuilds to fail with Mac Catalyst (because the directory is read-write the test would succeed, but it would write files in the root directory of the app bundle, which is not allowed for macOS apps, and thus codesign would fail when rebuilding the app). So change the test to create any files in a temporary directory, and adjust it to always expect the file to be created. And just in case also delete the file at the end of the test. --- .../ios/link sdk/LinkSdkRegressionTest.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index 90ea07ed3651..82bade0e2a5b 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -385,14 +385,19 @@ public void Bug2000_NSPersistentStoreCoordinator () Assert.That (model.Handle, Is.Not.EqualTo (IntPtr.Zero), "NSManagedObjectModel"); model.Entities = new NSEntityDescription[1] { entity }; model.SetEntities (model.Entities, String.Empty); - - NSUrl url = new NSUrl ("test.sqlite", false); - // from http://bugzilla.xamarin.com/show_bug.cgi?id=2000 - NSError error; - var c = new NSPersistentStoreCoordinator (model); - c.AddPersistentStoreWithType (NSPersistentStoreCoordinator.SQLiteStoreType, null, url, null, out error); - Assert.True (Runtime.Arch == Arch.SIMULATOR ? error == null : error.Code == 512, "error"); + var sqlitePath = Path.Combine (NSFileManager.TemporaryDirectory, "test.sqlite"); + NSUrl url = NSUrl.FromFilename (sqlitePath); + + try { + // from http://bugzilla.xamarin.com/show_bug.cgi?id=2000 + NSError error; + var c = new NSPersistentStoreCoordinator (model); + c.AddPersistentStoreWithType (NSPersistentStoreCoordinator.SQLiteStoreType, null, url, null, out error); + Assert.IsNull (error, "error"); + } finally { + File.Delete (sqlitePath); + } } [Test] From 28989758bae43be0aa9a7174ea2981035c8cc86b Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 14:08:26 +0200 Subject: [PATCH 8/9] [link sdk] The SpecialFolder.ProgramFiles path may or may not exist. --- tests/linker/ios/link sdk/LinkSdkRegressionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index 82bade0e2a5b..f67c41267af1 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -936,7 +936,7 @@ public void SpecialFolder () // and the simulator is more lax #if NET // ProgramFiles is different on .NET: https://github.com/dotnet/runtime/pull/41959#discussion_r485069017 - path = TestFolder (Environment.SpecialFolder.ProgramFiles, readOnly: device, exists: false); + path = TestFolder (Environment.SpecialFolder.ProgramFiles, readOnly: device, exists: null /* may or may not exist */); var applicationsPath = NSSearchPath.GetDirectories (NSSearchPathDirectory.ApplicationDirectory, NSSearchPathDomain.All, true).FirstOrDefault (); Assert.That (path, Is.EqualTo (applicationsPath), "path - ProgramFiles"); #else From d30bdc9809b9ace2678dfb4a0fa451a7e94eb3f3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 12:24:28 +0200 Subject: [PATCH 9/9] [dotnet-linker] Enable some optimizations on Mac Catalyst. Fixes this link all test: SetupBlockPerfTest: At least 6x speedup Expected: greater than 6 But was: 0.81771070682913238d --- tools/common/Optimizations.cs | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/common/Optimizations.cs b/tools/common/Optimizations.cs index 282c010be239..bbc763ee5a0e 100644 --- a/tools/common/Optimizations.cs +++ b/tools/common/Optimizations.cs @@ -32,24 +32,24 @@ public class Optimizations }; static ApplePlatform [][] valid_platforms = new ApplePlatform [][] { - /* Opt.RemoveUIThreadChecks */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.DeadCodeElimination */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.InlineIsDirectBinding */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.InlineIntPtrSize */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.InlineRuntimeArch */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.BlockLiteralSetupBlock */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.RegisterProtocols */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.InlineDynamicRegistrationSupported */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.StaticBlockToDelegateLookup */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.RemoveDynamicRegistrar */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.TrimArchitectures */ new ApplePlatform [] { ApplePlatform.MacOSX, }, - /* Opt.RemoveUnsupportedILForBitcode */ new ApplePlatform [] { ApplePlatform.WatchOS, }, - /* Opt.InlineIsARM64CallingConvention */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.SealAndDevirtualize */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.StaticConstructorBeforeFieldInit */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.CustomAttributesRemoval */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.ExperimentalFormsProductType */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS }, - /* Opt.ForceRejectedTypesRemoval */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS }, + /* Opt.RemoveUIThreadChecks */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.DeadCodeElimination */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.InlineIsDirectBinding */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.InlineIntPtrSize */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.InlineRuntimeArch */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS }, + /* Opt.BlockLiteralSetupBlock */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.RegisterProtocols */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.InlineDynamicRegistrationSupported */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.StaticBlockToDelegateLookup */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.RemoveDynamicRegistrar */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.TrimArchitectures */ new ApplePlatform [] { ApplePlatform.MacOSX, }, + /* Opt.RemoveUnsupportedILForBitcode */ new ApplePlatform [] { ApplePlatform.WatchOS, }, + /* Opt.InlineIsARM64CallingConvention */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.SealAndDevirtualize */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.StaticConstructorBeforeFieldInit */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.CustomAttributesRemoval */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.ExperimentalFormsProductType */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.MacOSX, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, + /* Opt.ForceRejectedTypesRemoval */ new ApplePlatform [] { ApplePlatform.iOS, ApplePlatform.WatchOS, ApplePlatform.TVOS, ApplePlatform.MacCatalyst }, }; enum Opt