xamarin-macios/tests/xtro-sharpie/Makefile

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

TOP=../..
2016-05-26 16:06:52 +03:00
include $(TOP)/Make.config
# a 64bits mono is required because of the clang requirement
MONO ?= mono64 --debug
SHARPIE ?= sharpie
2016-05-26 16:06:52 +03:00
XCODE=$(abspath $(XCODE_DEVELOPER_ROOT)/../..)
# MacCatalyst is currently broken wrt sharpie and Xcode 14 beta 2, so skip it.
XTRO_DOTNET_PLATFORMS=$(filter-out MacCatalyst,$(DOTNET_PLATFORMS))
ANNOTATIONS_DIR=.
2021-11-15 17:00:12 +03:00
DOTNET_ANNOTATIONS_DIR=api-annotations-dotnet
[CoreTelephony] Fix multiple issues. Fixes #13931. (#14242) * Add to Mac Catalyst. Fixes #13931. * Manually include CoreTelephony headers in xtro. There's no umbrella header in CoreTelephony 😡 😞 * Fix availability attributes * Only CTCall and CTCallCenter are deprecated in the CoreTelephony API. * None of these APIs are obsolete, just deprecated. * Add Mac Catalyst attributes. One curious fact is that the PCSC framework interferes with compiling CTCarrer.h: In file included from /private/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/n0b0byrt.h:163: /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h:62:41: error: reference to 'BOOL' is ambiguous @property (nonatomic, readonly, assign) BOOL allowsVOIP __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/PCSC.framework/Headers/wintypes.h:59:18: note: candidate found by name lookup is 'BOOL' typedef int16_t BOOL; ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/objc/./objc.h:78:18: note: candidate found by name lookup is 'BOOL' typedef bool BOOL; ^ 1 error generated. but since we don't bind the PCSC framework, we can just ask ObjectiveSharpie to exclude it. Fixes https://github.com/xamarin/xamarin-macios/issues/13931.
2022-02-25 01:41:52 +03:00
# The PCSC framework causes compilation errors if CTCarrier.h is included,
# but we don't need the PCSC framework (we don't bind it), so just exclude it.
CORETELEPHONY_HEADERS = \
-exclude PCSC \
-i CoreTelephony/CoreTelephonyDefines.h \
-i CoreTelephony/CTCarrier.h \
-i CoreTelephony/CTCall.h \
-i CoreTelephony/CTCallCenter.h \
-i CoreTelephony/CTTelephonyNetworkInfo.h \
-i CoreTelephony/CTSubscriber.h \
-i CoreTelephony/CTSubscriberInfo.h \
all-local::
2016-05-26 16:06:52 +03:00
clean-local::
rm -f xtro-report/bin/Debug/xtro-report.exe bin/Debug/xtro-sharpie.exe
rm -f *.tmp
2016-05-26 16:06:52 +03:00
rm -rf *os*.pch*
bin/Debug/xtro-sharpie.exe xtro-report/bin/Debug/xtro-report.exe xtro-sanity/bin/Debug/xtro-sanity.exe build: .stamp-build
.stamp-build: $(wildcard *.cs) pch-info.proj
$(Q_BUILD) $(SYSTEM_MSBUILD) $(MSBUILD_VERBOSITY) xtro-sharpie.sln /r /bl:$@.binlog
$(Q) touch $@
XIOS ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/64bits/iOS/Xamarin.iOS.dll
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
XIOS_LIBDIR ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS
XIOS_GL ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/OpenTK-1.0.dll
2016-05-26 16:06:52 +03:00
XIOS_ARCH = arm64
XIOS_PCH = iphoneos$(IOS_SDK_VERSION)-$(XIOS_ARCH).pch
2021-11-15 17:00:12 +03:00
XIOS_RID = ios-arm64
2016-05-26 16:06:52 +03:00
$(XIOS_PCH): .stamp-check-sharpie
$(SHARPIE) sdk-db --xcode $(XCODE) -s iphoneos$(IOS_SDK_VERSION) -a $(XIOS_ARCH) \
-i ThreadNetwork/THClient.h \
[CoreTelephony] Fix multiple issues. Fixes #13931. (#14242) * Add to Mac Catalyst. Fixes #13931. * Manually include CoreTelephony headers in xtro. There's no umbrella header in CoreTelephony 😡 😞 * Fix availability attributes * Only CTCall and CTCallCenter are deprecated in the CoreTelephony API. * None of these APIs are obsolete, just deprecated. * Add Mac Catalyst attributes. One curious fact is that the PCSC framework interferes with compiling CTCarrer.h: In file included from /private/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/n0b0byrt.h:163: /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h:62:41: error: reference to 'BOOL' is ambiguous @property (nonatomic, readonly, assign) BOOL allowsVOIP __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/PCSC.framework/Headers/wintypes.h:59:18: note: candidate found by name lookup is 'BOOL' typedef int16_t BOOL; ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/objc/./objc.h:78:18: note: candidate found by name lookup is 'BOOL' typedef bool BOOL; ^ 1 error generated. but since we don't bind the PCSC framework, we can just ask ObjectiveSharpie to exclude it. Fixes https://github.com/xamarin/xamarin-macios/issues/13931.
2022-02-25 01:41:52 +03:00
$(CORETELEPHONY_HEADERS) \
2016-05-26 16:06:52 +03:00
XWATCHOS ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/32bits/watchOS/Xamarin.WatchOS.dll
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
XWATCHOS_LIBDIR ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.WatchOS
2016-05-26 16:06:52 +03:00
XWATCHOS_ARCH = armv7
XWATCHOS_PCH = watchos$(WATCH_SDK_VERSION)-$(XWATCHOS_ARCH).pch
$(XWATCHOS_PCH): .stamp-check-sharpie
$(SHARPIE) sdk-db --xcode $(XCODE) -s watchos$(WATCH_SDK_VERSION) -a $(XWATCHOS_ARCH)
2016-05-26 16:06:52 +03:00
XTVOS ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/64bits/tvOS/Xamarin.TVOS.dll
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
XTVOS_LIBDIR ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/
XTVOS_GL ?= $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/OpenTK-1.0.dll
2016-05-26 16:06:52 +03:00
XTVOS_ARCH = arm64
XTVOS_PCH = appletvos$(TVOS_SDK_VERSION)-$(XTVOS_ARCH).pch
2021-11-15 17:00:12 +03:00
XTVOS_RID = tvos-arm64
2016-05-26 16:06:52 +03:00
$(XTVOS_PCH): .stamp-check-sharpie
$(SHARPIE) sdk-db --xcode $(XCODE) -s appletvos$(TVOS_SDK_VERSION) -a $(XTVOS_ARCH)
2016-05-26 16:06:52 +03:00
XMACOS ?= $(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/64bits/mobile/Xamarin.Mac.dll
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
XMACOS_LIBDIR ?= $(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac
XMACOS_ARCH = x86_64
XMACOS_PCH = macosx$(MACOS_SDK_VERSION)-$(XMACOS_ARCH).pch
2021-11-15 17:00:12 +03:00
XMACOS_RID = osx-x64
2016-05-26 16:06:52 +03:00
$(XMACOS_PCH): .stamp-check-sharpie
[CoreTelephony] Fix multiple issues. Fixes #13931. (#14242) * Add to Mac Catalyst. Fixes #13931. * Manually include CoreTelephony headers in xtro. There's no umbrella header in CoreTelephony 😡 😞 * Fix availability attributes * Only CTCall and CTCallCenter are deprecated in the CoreTelephony API. * None of these APIs are obsolete, just deprecated. * Add Mac Catalyst attributes. One curious fact is that the PCSC framework interferes with compiling CTCarrer.h: In file included from /private/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/n0b0byrt.h:163: /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h:62:41: error: reference to 'BOOL' is ambiguous @property (nonatomic, readonly, assign) BOOL allowsVOIP __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/PCSC.framework/Headers/wintypes.h:59:18: note: candidate found by name lookup is 'BOOL' typedef int16_t BOOL; ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/objc/./objc.h:78:18: note: candidate found by name lookup is 'BOOL' typedef bool BOOL; ^ 1 error generated. but since we don't bind the PCSC framework, we can just ask ObjectiveSharpie to exclude it. Fixes https://github.com/xamarin/xamarin-macios/issues/13931.
2022-02-25 01:41:52 +03:00
$(SHARPIE) sdk-db --xcode $(XCODE) -s macosx$(MACOS_SDK_VERSION) -a $(XMACOS_ARCH) \
-exclude JavaNativeFoundation \
-exclude ParavirtualizedGraphics \
[CoreTelephony] Fix multiple issues. Fixes #13931. (#14242) * Add to Mac Catalyst. Fixes #13931. * Manually include CoreTelephony headers in xtro. There's no umbrella header in CoreTelephony 😡 😞 * Fix availability attributes * Only CTCall and CTCallCenter are deprecated in the CoreTelephony API. * None of these APIs are obsolete, just deprecated. * Add Mac Catalyst attributes. One curious fact is that the PCSC framework interferes with compiling CTCarrer.h: In file included from /private/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/n0b0byrt.h:163: /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h:62:41: error: reference to 'BOOL' is ambiguous @property (nonatomic, readonly, assign) BOOL allowsVOIP __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/PCSC.framework/Headers/wintypes.h:59:18: note: candidate found by name lookup is 'BOOL' typedef int16_t BOOL; ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/objc/./objc.h:78:18: note: candidate found by name lookup is 'BOOL' typedef bool BOOL; ^ 1 error generated. but since we don't bind the PCSC framework, we can just ask ObjectiveSharpie to exclude it. Fixes https://github.com/xamarin/xamarin-macios/issues/13931.
2022-02-25 01:41:52 +03:00
$(CORETELEPHONY_HEADERS) \
2016-05-26 16:06:52 +03:00
XMACCATALYST_ARCH = x86_64
XMACCATALYST_PCH = ios$(MACCATALYST_SDK_VERSION)-macabi-$(XMACCATALYST_ARCH).pch
2021-11-15 17:00:12 +03:00
XMACCATALYST_RID = maccatalyst-x64
$(XMACCATALYST_PCH): .stamp-check-sharpie
$(SHARPIE) sdk-db --xcode $(XCODE) -s ios$(MACCATALYST_SDK_VERSION)-macabi -a $(XMACCATALYST_ARCH) \
-exclude AGL \
2022-06-14 17:12:34 +03:00
-exclude AudioVideoBridging \
-exclude CalendarStore \
-exclude Carbon \
-exclude ClockKit \
-exclude DiscRecordingUI \
-exclude GLKit \
-exclude ICADevices \
-exclude InputMethodKit \
-exclude InstallerPlugins \
-exclude IOBluetooth \
-exclude IOBluetoothUI \
-exclude JavaNativeFoundation \
-exclude LDAP \
-exclude Python \
-exclude Quartz \
Bump to Xcode 13 beta 1. (#11861) * Bump maccore. New commits in xamarin/maccore: * xamarin/maccore@9acbbed1f6 [mlaunch] Add support for Xcode 13 beta 1. (#2452) * xamarin/maccore@e48f75c0b6 [Xamarin.Hosting] Fix the --stdout arg not being forwarded to DeviceLaunchConfig (#2435) * xamarin/maccore@109c695b1b [Xamarin.Hosting] Fix help string for launchdev argument (#2429) Diff: https://github.com/xamarin/maccore/compare/cddbd1915dcb27d8bf2d9b3b9cc4aeb22785698e..9acbbed1f60788349c60437dba11531a866777a8 * [xtro] Fix generation of .pch files * [xtro] Fix deprecated check to handle (anonymous) declarations and enable latest C# syntax in project * [xtro] Fix _sanity_ checks * [xtro] Update todo for beta 1 * [Siminstaller] Force siminstaller to use the xcode 12.5 url Related issue: https://github.com/xamarin/xamarin-macios/issues/11881 * Fix introspection failures (due to [breaking] changes) * [tests][intro] Fix hang for tvOS Creating an instance of `NSMetadataQuery` hangs the simulator. Even after (xharness) timeout the simulator is not in a good state to run further tests and every new (tvOS) test will also hang... * [tests][intro] Same hang for watchOS except that further test execution does not seem affected (like tvOS) ``` CoreSimulator 772.1 - Device: Apple Watch Series 3 - 38mm (watchOS 8.0) - created by XHarness (42262867-E060-40C0-803E-6DA676AF50CC) - Runtime: watchOS 8.0 (19R5266p) - DeviceType: Apple Watch Series 3 - 38mm Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread 0 com.apple.Foundation 0x00007fff21470bd0 -[NSMetadataQuery dealloc] + 432 1 libobjc.A.dylib 0x00007fff200d11f7 objc_object::sidetable_release(bool, bool) + 177 2 com.apple.Foundation 0x00007fff21470a03 -[NSMetadataQuery init] + 64 3 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107efc139 xamarin_dyn_objc_msgSend + 217 (trampolines-x86_64-objc_msgSend.s:15) 4 ??? 0x000000010c76d4f6 0 + 4504081654 5 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107cffc85 mono_jit_runtime_invoke + 1621 (mini-runtime.c:3197) 6 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e177d8 do_runtime_invoke + 54 (object.c:3052) [inlined] 7 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e177d8 mono_runtime_invoke_checked + 136 (object.c:3220) 8 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e1e3c5 mono_runtime_try_invoke_array + 2101 (object.c:5601) 9 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107daf977 ves_icall_InternalInvoke + 871 (icall.c:3927) 10 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107dc0167 ves_icall_InternalInvoke_raw + 103 (icall-def.h:667) 11 ??? 0x000000010a232799 0 + 4465043353 12 ??? 0x000000010c76e08b 0 + 4504084619 ``` * [tests][monotouch-test] Fix failures with xcode 13 beta 1 * [tests][mmptest] Use a FAT framework that's build with x86_64 and arm64 Co-authored-by: Alex Soto <alex@alexsoto.me> Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com> Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-06-11 03:07:20 +03:00
-exclude QuickLookUI \
-exclude SecurityInterface \
Bump to Xcode 13 beta 1. (#11861) * Bump maccore. New commits in xamarin/maccore: * xamarin/maccore@9acbbed1f6 [mlaunch] Add support for Xcode 13 beta 1. (#2452) * xamarin/maccore@e48f75c0b6 [Xamarin.Hosting] Fix the --stdout arg not being forwarded to DeviceLaunchConfig (#2435) * xamarin/maccore@109c695b1b [Xamarin.Hosting] Fix help string for launchdev argument (#2429) Diff: https://github.com/xamarin/maccore/compare/cddbd1915dcb27d8bf2d9b3b9cc4aeb22785698e..9acbbed1f60788349c60437dba11531a866777a8 * [xtro] Fix generation of .pch files * [xtro] Fix deprecated check to handle (anonymous) declarations and enable latest C# syntax in project * [xtro] Fix _sanity_ checks * [xtro] Update todo for beta 1 * [Siminstaller] Force siminstaller to use the xcode 12.5 url Related issue: https://github.com/xamarin/xamarin-macios/issues/11881 * Fix introspection failures (due to [breaking] changes) * [tests][intro] Fix hang for tvOS Creating an instance of `NSMetadataQuery` hangs the simulator. Even after (xharness) timeout the simulator is not in a good state to run further tests and every new (tvOS) test will also hang... * [tests][intro] Same hang for watchOS except that further test execution does not seem affected (like tvOS) ``` CoreSimulator 772.1 - Device: Apple Watch Series 3 - 38mm (watchOS 8.0) - created by XHarness (42262867-E060-40C0-803E-6DA676AF50CC) - Runtime: watchOS 8.0 (19R5266p) - DeviceType: Apple Watch Series 3 - 38mm Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread 0 com.apple.Foundation 0x00007fff21470bd0 -[NSMetadataQuery dealloc] + 432 1 libobjc.A.dylib 0x00007fff200d11f7 objc_object::sidetable_release(bool, bool) + 177 2 com.apple.Foundation 0x00007fff21470a03 -[NSMetadataQuery init] + 64 3 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107efc139 xamarin_dyn_objc_msgSend + 217 (trampolines-x86_64-objc_msgSend.s:15) 4 ??? 0x000000010c76d4f6 0 + 4504081654 5 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107cffc85 mono_jit_runtime_invoke + 1621 (mini-runtime.c:3197) 6 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e177d8 do_runtime_invoke + 54 (object.c:3052) [inlined] 7 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e177d8 mono_runtime_invoke_checked + 136 (object.c:3220) 8 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e1e3c5 mono_runtime_try_invoke_array + 2101 (object.c:5601) 9 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107daf977 ves_icall_InternalInvoke + 871 (icall.c:3927) 10 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107dc0167 ves_icall_InternalInvoke_raw + 103 (icall-def.h:667) 11 ??? 0x000000010a232799 0 + 4465043353 12 ??? 0x000000010c76e08b 0 + 4504084619 ``` * [tests][monotouch-test] Fix failures with xcode 13 beta 1 * [tests][mmptest] Use a FAT framework that's build with x86_64 and arm64 Co-authored-by: Alex Soto <alex@alexsoto.me> Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com> Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-06-11 03:07:20 +03:00
-exclude Virtualization \
-i HomeKit/HomeKit.h \
[CoreTelephony] Fix multiple issues. Fixes #13931. (#14242) * Add to Mac Catalyst. Fixes #13931. * Manually include CoreTelephony headers in xtro. There's no umbrella header in CoreTelephony 😡 😞 * Fix availability attributes * Only CTCall and CTCallCenter are deprecated in the CoreTelephony API. * None of these APIs are obsolete, just deprecated. * Add Mac Catalyst attributes. One curious fact is that the PCSC framework interferes with compiling CTCarrer.h: In file included from /private/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/n0b0byrt.h:163: /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h:62:41: error: reference to 'BOOL' is ambiguous @property (nonatomic, readonly, assign) BOOL allowsVOIP __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/PCSC.framework/Headers/wintypes.h:59:18: note: candidate found by name lookup is 'BOOL' typedef int16_t BOOL; ^ /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/objc/./objc.h:78:18: note: candidate found by name lookup is 'BOOL' typedef bool BOOL; ^ 1 error generated. but since we don't bind the PCSC framework, we can just ask ObjectiveSharpie to exclude it. Fixes https://github.com/xamarin/xamarin-macios/issues/13931.
2022-02-25 01:41:52 +03:00
$(CORETELEPHONY_HEADERS) \
2021-11-15 17:00:12 +03:00
define DotNetAssembly
ifdef TESTS_USE_SYSTEM
X$(2)_DOTNET ?= $(DOTNET_DIR)/packs/$($(X$(2)_RID)_NUGET_RUNTIME_NAME)/$($(2)_WORKLOAD_VERSION)/runtimes/$(X$(2)_RID)/lib/$(DOTNET_TFM)/$(DOTNET_$(2)_ASSEMBLY_NAME).dll
else
X$(2)_DOTNET ?= $(DOTNET_DESTDIR)/$($(X$(2)_RID)_NUGET_RUNTIME_NAME)/runtimes/$(X$(2)_RID)/lib/$(DOTNET_TFM)/$(DOTNET_$(2)_ASSEMBLY_NAME).dll
endif
2021-11-15 17:00:12 +03:00
dotnet-$(1)-$($(2)_SDK_VERSION).g.cs: .stamp-check-sharpie
$$(SHARPIE) query -bind $$(X$(2)_PCH) > $$@
endef
$(foreach platform,$(XTRO_DOTNET_PLATFORMS),$(eval $(call DotNetAssembly,$(platform),$(shell echo $(platform) | tr a-z A-Z))))
pch-info.proj: Makefile
$(Q) rm -f $@.tmp
$(Q) printf "<Project>\\n" >> $@.tmp
$(Q) printf "\\t<PropertyGroup>\\n" >> $@.tmp
$(Q) printf "$(foreach platform,$(ALL_DOTNET_PLATFORMS) watchOS,\\t\\t<$(platform)_PCH>$(X$(shell echo $(platform) | tr '[:lower:]' '[:upper:]')_PCH)</$(platform)_PCH>\\n)" >> $@.tmp
$(Q) printf "$(foreach platform,$(ALL_DOTNET_PLATFORMS),\\t\\t<$(platform)_DLL>$(X$(shell echo $(platform) | tr '[:lower:]' '[:upper:]')_DOTNET)</$(platform)_DLL>\\n)" >> $@.tmp
$(Q) printf "\\t</PropertyGroup>\\n" >> $@.tmp
$(Q) printf "</Project>\\n" >> $@.tmp
$(Q_GEN) mv $@.tmp $@
ios-$(IOS_SDK_VERSION).g.cs: $(XIOS_PCH)
ifdef INCLUDE_IOS
gen-ios: ios-$(IOS_SDK_VERSION).g.cs .stamp-check-sharpie
$(SHARPIE) query -bind $(XIOS_PCH) > ios-$(IOS_SDK_VERSION).g.cs
else
gen-ios: ; @true
endif
tvos-$(TVOS_SDK_VERSION).g.cs: $(XTVOS_PCH)
ifdef INCLUDE_TVOS
gen-tvos: tvos-$(TVOS_SDK_VERSION).g.cs .stamp-check-sharpie
$(SHARPIE) query -bind $(XTVOS_PCH) > tvos-$(TVOS_SDK_VERSION).g.cs
else
gen-tvos: ; @true
endif
watchos-$(WATCH_SDK_VERSION).g.cs: $(XWATCHOS_PCH)
ifdef INCLUDE_WATCH
gen-watchos: watchos-$(WATCH_SDK_VERSION).g.cs .stamp-check-sharpie
$(SHARPIE) query -bind $(XWATCHOS_PCH) > watchos-$(WATCH_SDK_VERSION).g.cs
else
gen-watchos: ; @true
endif
macos-$(MACOS_SDK_VERSION).g.cs: $(XMACOS_PCH)
ifdef INCLUDE_MAC
gen-macos: macos-$(MACOS_SDK_VERSION).g.cs .stamp-check-sharpie
$(SHARPIE) query -bind $(XMACOS_PCH) > macos-$(MACOS_SDK_VERSION).g.cs
else
gen-macos: ; @true
endif
maccatalyst-$(MACCATALYST_SDK_VERSION).g.cs: $(XMACCATALYST_PCH)
ifdef INCLUDE_MACCATALYST
gen-maccatalyst: maccatalyst-$(MACCATALYST_SDK_VERSION).g.cs .stamp-check-sharpie
$(SHARPIE) query -bind $(XMACCATALYST_PCH) > maccatalyst-$(MACCATALYST_SDK_VERSION).g.cs
else
gen-maccatalyst: ; @true
endif
gen-all: gen-ios gen-tvos gen-watchos gen-macos
wrench:
$(MAKE) -j8 classify
2021-11-15 17:00:12 +03:00
dotnet-wrench:
$(MAKE) -j8 dotnet-classify
ifdef INCLUDE_XAMARIN_LEGACY
report/index.html: xtro-report/bin/Debug/xtro-report.exe .stamp-classify
rm -rf report/
$(MONO) xtro-report/bin/Debug/xtro-report.exe $(ANNOTATIONS_DIR) report
report: report/index.html
endif
ifdef ENABLE_DOTNET
report-dotnet/index.html: xtro-report/bin/Debug/xtro-report.exe .stamp-dotnet-classify
2021-11-15 17:00:12 +03:00
rm -rf report-dotnet
$(MONO) xtro-report/bin/Debug/xtro-report.exe $(DOTNET_ANNOTATIONS_DIR) report-dotnet
dotnet-report: report-dotnet/index.html
endif
2021-11-15 17:00:12 +03:00
report-short:
JENKINS_SERVER_COOKIE=1 make report
2021-11-15 17:00:12 +03:00
define DotNetClassify
.stamp-dotnet-classify-$(1): bin/Debug/xtro-sharpie.exe $$(X$(2)_PCH) $$(X$(2)_DOTNET)
rm -f $$(DOTNET_ANNOTATIONS_DIR)/$(1)-*.raw
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
$(MONO) bin/Debug/xtro-sharpie.exe --output-directory $$(DOTNET_ANNOTATIONS_DIR) --lib $(DOTNET_BCL_DIR) $$(X$(2)_PCH) $$(X$(2)_DOTNET)
2021-11-15 17:00:12 +03:00
touch $$@
dotnet-classify-$(1): .stamp-dotnet-classify-$(1)
DOTNET_CLASSIFY += .stamp-dotnet-classify-$(1)
endef
$(foreach platform,$(XTRO_DOTNET_PLATFORMS),$(eval $(call DotNetClassify,$(platform),$(shell echo $(platform) | tr a-z A-Z))))
2021-11-15 17:00:12 +03:00
ifdef INCLUDE_IOS
INCLUDED_PLATFORMS+=iOS
CLASSIFY+=.stamp-classify-ios
.stamp-classify-ios: bin/Debug/xtro-sharpie.exe $(XIOS_PCH) $(XIOS) $(XIOS_GL)
rm -f $(ANNOTATIONS_DIR)/iOS-*.raw
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
$(MONO) bin/Debug/xtro-sharpie.exe --output-directory $(ANNOTATIONS_DIR) --lib $(XIOS_LIBDIR) $(XIOS_PCH) $(XIOS) $(XIOS_GL)
$(Q) touch $@
endif
ifdef INCLUDE_TVOS
INCLUDED_PLATFORMS+=tvOS
CLASSIFY+=.stamp-classify-tvos
.stamp-classify-tvos: bin/Debug/xtro-sharpie.exe $(XTVOS_PCH) $(XTVOS) $(XTVOS_GL)
rm -f $(ANNOTATIONS_DIR)/tvOS-*.raw
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
$(MONO) bin/Debug/xtro-sharpie.exe --output-directory $(ANNOTATIONS_DIR) --lib $(XTVOS_LIBDIR) $(XTVOS_PCH) $(XTVOS) $(XTVOS_GL)
$(Q) touch $@
endif
ifdef INCLUDE_WATCH
INCLUDED_PLATFORMS+=watchOS
CLASSIFY+=.stamp-classify-watchos
.stamp-classify-watchos: bin/Debug/xtro-sharpie.exe $(XWATCHOS_PCH) $(XWATCHOS)
rm -f $(ANNOTATIONS_DIR)/watchOS-*.raw
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
$(MONO) bin/Debug/xtro-sharpie.exe --output-directory $(ANNOTATIONS_DIR) --lib $(XWATCHOS_LIBDIR) $(XWATCHOS_PCH) $(XWATCHOS)
$(Q) touch $@
endif
ifdef INCLUDE_MAC
INCLUDED_PLATFORMS+=macOS
CLASSIFY+=.stamp-classify-macos
.stamp-classify-macos: bin/Debug/xtro-sharpie.exe $(XMACOS_PCH) $(XMACOS)
rm -f $(ANNOTATIONS_DIR)/macOS-*.raw
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177) Add support to xtro-sharpie for where to look for referenced assemblies, and adjust assembly resolution to only look in those directories. This makes sure xtro-sharpie loads the expected references, and fixes a problem where the (broken) assembly resolution wouldn't find a .NET assembly because it doesn't exist in legacy Xamarin (where it would look by default). Fixes this problem that showed up in a different PR (due to new .NET API referencing the System.Runtime.Loader assembly, which doesn't exist in legacy Xamarin): mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748 at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280 at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332 at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104 at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52 at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28 make: *** [.stamp-dotnet-classify-tvOS] Error 1 Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 19:59:47 +03:00
$(MONO) bin/Debug/xtro-sharpie.exe --output-directory $(ANNOTATIONS_DIR) --lib $(XMACOS_LIBDIR) $(XMACOS_PCH) $(XMACOS)
$(Q) touch $@
endif
ifdef INCLUDE_XAMARIN_LEGACY
.stamp-classify: xtro-sanity/bin/Debug/xtro-sanity.exe $(CLASSIFY)
$(MONO) xtro-sanity/bin/Debug/xtro-sanity.exe $(abspath $(ANNOTATIONS_DIR)) "$(ALL_PLATFORMS)" $(INCLUDED_PLATFORMS)
$(Q) touch $@
classify: .stamp-classify
endif
ifdef ENABLE_DOTNET
2021-11-15 17:00:12 +03:00
.stamp-dotnet-classify: xtro-sanity/bin/Debug/xtro-sanity.exe $(DOTNET_CLASSIFY)
2022-10-17 11:26:44 +03:00
$(MONO) xtro-sanity/bin/Debug/xtro-sanity.exe $(abspath $(DOTNET_ANNOTATIONS_DIR)) "$(ALL_DOTNET_PLATFORMS)" $(XTRO_DOTNET_PLATFORMS)
2021-11-15 17:00:12 +03:00
$(Q) touch $@
dotnet-classify: .stamp-dotnet-classify
endif
2021-11-15 17:00:12 +03:00
insane:
XTRO_SANITY_SKIP=1 make all
remove-empty:
find . -size 0 | xargs git rm
ifdef INCLUDE_XAMARIN_LEGACY
all: report
endif
ifdef ENABLE_DOTNET
all: dotnet-report
endif
.stamp-check-sharpie:
@$(TOP)/system-dependencies.sh --ignore-all --enforce-sharpie
@touch $@
remove-empty-files:
find . -empty -exec git rm -f {} \;
U2TODO = u2todo/bin/Debug/u2todo.exe
$(U2TODO): $(wildcard u2todo/*.cs u2todo/*.csproj Filter.cs)
$(Q) $(SYSTEM_MSBUILD) $(MSBUILD_VERBOSITY) /bl:$@.binlog /r
$(Q) touch $@
unclassified2todo-classic: $(U2TODO)
2021-11-15 17:00:12 +03:00
cd $(ANNOTATIONS_DIR) && $(MONO) $(abspath $(U2TODO))
@for filename in $(git status -s | cut -c4- | grep .todo); do \
sort -o "$filename" "$filename"; \
done
2021-11-15 17:00:12 +03:00
unclassified2todo-dotnet: $(U2TODO)
$(SYSTEM_CSC) -features:strict Filter.cs u2todo/u2todo.cs
cd $(DOTNET_ANNOTATIONS_DIR) && $(MONO) $(abspath $(U2TODO))
unclassified2todo: unclassified2todo-classic unclassified2todo-dotnet