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

Allow the NativeAOT runtime pack to be specified as the ILC runtime package #111876

Conversation

jkoritzinsky
Copy link
Member

Allow specifying the NativeAOT runtime pack as the "runtime package" for ILC to enable us to exclusively ship the NativeAOT runtime through the NativeAOT runtime pack packages without further breaking the in-box dotnet build /t:Publish scenario any more than it already is.

This change also helps move us towards less confusion in VMR/Source-Build scenarios. Today, we have to build a "host ILC" package that targets the SDK's RID with only ILC. If this one is accidentally picked up by any testing in the VMR for runtime assets, things fail with a pretty inscrutable error.
In the future, we'll still have to build the "host ILC" package, but if we move the SDK to only use the NativeAOT runtime pack for "target" assets in .NET 10+, we can ensure that the "host ILC" package doesn't have a shape that differs from the actually shipping ILC package.

Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@filipnavara
Copy link
Member

filipnavara commented Jan 28, 2025

Was this tested in the iOS-like scenarios (which use PublishAotUsingRuntimePack)? Does this depend on any SDK changes?

Also, is this supposed to replace dotnet/sdk#37872?

@jkoritzinsky
Copy link
Member Author

This depends on a future SDK change to actually do anything (that change will actually give back the runtime pack package instead of the ILC target package).

This does not replace dotnet/sdk#37872. That is still planned to be merged in the future, after a solution for the _IsPublishing property is decided.

@jkoritzinsky jkoritzinsky requested a review from sbomer January 29, 2025 19:02
jkoritzinsky added a commit to jkoritzinsky/dotnet-sdk that referenced this pull request Jan 31, 2025
…vided as part of the KnownILCompilerPack metadata.

Depends on dotnet/runtime#111876
Copy link
Member

@sbomer sbomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention to get rid of IlcUseNativeAOTRuntimePackLayout once the SDK change flows? LGTM, thank you!

@jkoritzinsky
Copy link
Member Author

Is the intention to get rid of IlcUseNativeAOTRuntimePackLayout once the SDK change flows? LGTM, thank you!

Yes, the plan is once dotnet/runtime is consuming an SDK that always has the NativeAOT runtime pack passed through in a way for this code to recognize, we can remove support for the old infrastructure and update the dogfooding docs.

@jkoritzinsky
Copy link
Member Author

/ba-g WBT failures are unrelated

@jkoritzinsky jkoritzinsky merged commit 9ff850e into dotnet:main Feb 5, 2025
126 of 128 checks passed
@jkoritzinsky jkoritzinsky deleted the nativeaot-runtime-pack-as-target-package branch February 5, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants