Do not AOT compile ilc/crossgen2 twice#125316
Conversation
I always wondered why we need to AOT compile ilc and crossgen2 twice, but never cared enough. With copilot cli I'm building clr.tools more often, so it crossed the threshold for me caring: * I don't think we ever needed to do this for ilc * We _possibly_ don't need this for crossgen2 after dotnet#125165
There was a problem hiding this comment.
Pull request overview
Simplifies the in-build publishing configuration for CoreCLR AOT tools (ilc and crossgen2) by removing the conditional Windows NativeAOT publish path and always publishing as single-file, aligning with the goal of avoiding redundant AOT compilation during clr.tools builds.
Changes:
- Remove conditional
PublishAot(Windows-only) logic fromcrossgen2_inbuild.csprojandILCompiler_inbuild.csproj. - Publish both in-build tools as single-file unconditionally.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj | Removes Windows-only NativeAOT publish logic; always publish single-file for in-build crossgen2. |
| src/coreclr/tools/aot/ILCompiler/ILCompiler_inbuild.csproj | Removes Windows-only NativeAOT publish logic; always publish single-file for in-build ilc. |
You can also share your feedback on Copilot code review. Take the survey.
Is the comment I'm deleting not correct? PublishAot seems to just be a workaround, not the desired configuration. We want single file, but couldn't do it, possibly for the same reason that the PR referenced in the top-post was running into. |
|
/azp runtime coreclr-outerloop |
|
Command 'runtime' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
|
/azp run runtime coreclr-outerloop |
|
No pipelines are associated with this pull request. |
|
/azp run runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Yeah this comment is wrong. I caught myself after I posted it and went to delete it. Guess I didn't catch it, sorry. |
|
/azp run runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
I always wondered why we need to AOT compile ilc and crossgen2 twice, but never cared enough. With copilot cli I'm building clr.tools more often, so it crossed the threshold for me caring:
Microsoft.DiaSymReader.Native#125165