-
Notifications
You must be signed in to change notification settings - Fork 5k
Don't bundle NativeAOT runtime assets in the ILCompiler package #116882
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
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
Does this break "building packages" https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/nativeaot.md#building-packages workflow for using local builds? |
I need to update those docs to match the changes, but using it should still be possible (if slightly more annoying). |
…store (as otherwise the right version number isn't available until after restore).
@@ -34,6 +34,14 @@ Run `build[.cmd|.sh] -c Release` from the repo root to build the NativeAOT toolc | |||
|
|||
* Add the package directory to your `nuget.config` file. For example, add `<add key="local" value="C:\runtime\artifacts\packages\Release\Shipping" />` | |||
* Run `dotnet add package Microsoft.DotNet.ILCompiler -v 10.0.0-dev` to add the local package reference to your project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Run `dotnet add package Microsoft.DotNet.ILCompiler -v 10.0.0-dev` to add the local package reference to your project. |
|
||
``` | ||
<ItemGroup> | ||
<PackageDownload Include="Microsoft.NETCore.App.Runtime.NativeAOT.win-x64" Version="[10.0.0-dev]" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<PackageDownload Include="Microsoft.NETCore.App.Runtime.NativeAOT.win-x64" Version="[10.0.0-dev]" /> | |
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="10.0.0-dev" /> | |
<PackageDownload Include="Microsoft.NETCore.App.Runtime.NativeAOT.win-x64" Version="[10.0.0-dev]" /> |
|
||
``` | ||
<ItemGroup> | ||
<PackageDownload Include="Microsoft.NETCore.App.Runtime.NativeAOT.win-x64" Version="[10.0.0-dev]" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the version really need to be in square brackets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For PackageDownload it's required and you can't reference a runtime pack via PackageReference (SDK blocks it)
Are they bundled today? I don't see it:
|
The problem is cross-compiling where the ILCompiler is on the host platform (eg. osx-arm64) and you are targeting a different platform (eg. ios-arm64). Then you'd get |
With dotnet/sdk#46611, the .NET SDK will now use the "NativeAOT runtime pack" as the "runtime package" when publishing for NativeAOT. It's not as clean as dotnet/sdk#37872, but it has the same effect on our packaging.
Now that the .NET SDK will always look in the "NativeAOT runtime pack" for .NET 10 and newer, we can do two things:
We leave the different properties as-is (ie the split between
aotsdk
andframework
) for usage in our tests.Contributes to #87060