Ref: #17374 (comment)
Look into whether we can change this:
<PropertyGroup>
<!-- Set the features for ILLink -->
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --feature ObjCRuntime.Runtime.Arch.IsSimulator $(_IsSimulatorFeature)</_ExtraTrimmerArgs>
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --feature ObjCRuntime.Runtime.IsManagedStaticRegistrar $(_IsManagedStaticRegistrarFeature)</_ExtraTrimmerArgs>
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --feature ObjCRuntime.Runtime.IsNativeAOT $(_IsNativeAOTFeature)</_ExtraTrimmerArgs>
</PropertyGroup>
<ItemGroup>
<!-- Set the features for ILC -->
<IlcArg Include="--feature:ObjCRuntime.Runtime.Arch.IsSimulator=$(_IsSimulatorFeature)" />
<IlcArg Include="--feature:ObjCRuntime.Runtime.IsManagedStaticRegistrar=$(_IsManagedStaticRegistrarFeature)" />
<IlcArg Include="--feature:ObjCRuntime.Runtime.IsNativeAOT=$(_IsNativeAOTFeature)" />
</ItemGroup>
from here: f39d80b (#17374)
to using RuntimeHostConfigurationOption items:
https://github.com/dotnet/sdk/blob/20b2949041a3cb8ab5f4a4c030ed280540b94e4f/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L485-L488
and that should hopefully work for both ILC and ILLinker.
Ref: #17374 (comment)
Look into whether we can change this:
from here:
f39d80b(#17374)to using RuntimeHostConfigurationOption items:
https://github.com/dotnet/sdk/blob/20b2949041a3cb8ab5f4a4c030ed280540b94e4f/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L485-L488
and that should hopefully work for both ILC and ILLinker.