Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate whether we can set ILC/ILLinker feature flags using RuntimeHostConfigurationOption #18483

Closed
Tracked by #17339
rolfbjarne opened this issue Jun 21, 2023 · 1 comment
Labels
enhancement The issue or pull request is an enhancement
Milestone

Comments

@rolfbjarne
Copy link
Member

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.

@rolfbjarne rolfbjarne added the enhancement The issue or pull request is an enhancement label Jun 21, 2023
@rolfbjarne rolfbjarne added this to the .NET 8 milestone Jun 21, 2023
ivanpovazan added a commit that referenced this issue Aug 21, 2023
This PR unifies the way `ObjCRuntime` features are passed to trimming
tools by using `RuntimeHostConfigurationOption`.

---
Fixes: #18483
@ivanpovazan
Copy link
Contributor

Fixed with fa06001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue or pull request is an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants