On linux the linker produces warnings like the following: resource ILLink.Descriptors.xml in System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e : warning IL2008: Could not resolve type 'System.StubHelpers.MngdSafeArrayMarshaler' [/home/sven/tmp/trimmed/trimmed.csproj]
I think they are coming from the runtime-generated descriptors which reference COM, even though COM is only enabled on windows. We may want to take DefineConstants into account when parsing header files in https://github.com/mono/linker/blob/main/src/ILLink.Tasks/CreateRuntimeRootDescriptorFile.cs.
/cc @LakshanF @vitek-karas
On linux the linker produces warnings like the following: resource ILLink.Descriptors.xml in System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e : warning IL2008: Could not resolve type 'System.StubHelpers.MngdSafeArrayMarshaler' [/home/sven/tmp/trimmed/trimmed.csproj]
I think they are coming from the runtime-generated descriptors which reference COM, even though COM is only enabled on windows. We may want to take DefineConstants into account when parsing header files in https://github.com/mono/linker/blob/main/src/ILLink.Tasks/CreateRuntimeRootDescriptorFile.cs.
/cc @LakshanF @vitek-karas