-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Packaging for crossgen2 as a framework dependent application. #27296
Conversation
This requires us to manually emit a runtimeconfig json for now, since the build produces a self-contained version of crossgen2. Also includes some minor cleanups to the way we build crossgen2: - Removed from build.proj since we explicitly build it as a self-contained application from build.cmd/build.sh - Removed the output path property from the csproj files. We use an explicit -o argument when publishing to specify the output folder
two simple scenarios we want to support in the short term: win_x64 to win_x64 and linux_x64 to linux_x64 compilations. | ||
Once we have more complex targets, especially cross-platform and cross-architecture, crossgen2 should move to its own | ||
package, and become a self-contained package. --> | ||
<Crossgen2RuntimeConfigFile>$(ArtifactsObjDir)crossgen2\crossgen2.runtimeconfig.json</Crossgen2RuntimeConfigFile> |
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.
This will go away in dotnet 6.0 when crossgen2 moves to its own package
src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.pkgproj
Outdated
Show resolved
Hide resolved
BTW, is crossgen2 the name we want to keep long term? |
I do not think so. It is ugly name. |
Last time this was discussed ("CPAOT directory structure on the CoreCLR side" internal email thread), the plan was to finalize the name before preview. Simon also threw an idea we could just call it crossgen (sans 2) once the native crossgen is retired. Like they say - there's only two hard problems in computer science... |
Renaming crossgen2 to just crossgen (still keeping crossgen2 for the publish folder name)
Fix minor path issue
I renamed the crossgen2 to just crossgen. I kept the publish folder name unchanged for now. |
@dagood Could you please review this? Also, is there anything else I need to do to have this new package published to the feed? |
Did something change since we last discussed this? In the "CPAOT directory structure on the CoreCLR side" internal email thread, Sergiy said "We should keep ‘2’ in the exe name for the move in order to avoid confusion at least in the nearest future. We can finalize the name before preview.". |
src/tools/crossgen2/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
Outdated
Show resolved
Hide resolved
src/.nuget/Microsoft.NETCore.Crossgen/Microsoft.NETCore.Crossgen.pkgproj
Outdated
Show resolved
Hide resolved
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.
I don't have experience with the recent stuff like Microsoft.Build.Traversal
, but some comments.
src/.nuget/Microsoft.NETCore.Crossgen/Microsoft.NETCore.Crossgen.pkgproj
Outdated
Show resolved
Hide resolved
src/.nuget/Microsoft.NETCore.Crossgen/Microsoft.NETCore.Crossgen.pkgproj
Outdated
Show resolved
Hide resolved
src/.nuget/Microsoft.NETCore.Crossgen/runtime.Linux.Microsoft.NETCore.Crossgen.props
Outdated
Show resolved
Hide resolved
src/.nuget/Microsoft.NETCore.Crossgen/runtime.Linux.Microsoft.NETCore.Crossgen.props
Outdated
Show resolved
Hide resolved
src/.nuget/Microsoft.NETCore.Crossgen/runtime.Linux.Microsoft.NETCore.Crossgen.props
Outdated
Show resolved
Hide resolved
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.
Did something change since we last discussed this? In the "CPAOT directory structure on the CoreCLR side" internal email thread, Sergiy said "We should keep ‘2’ in the exe name for the move in order to avoid confusion at least in the nearest future. We can finalize the name before preview.".
The problem is that any renaming down the line now will cause some headache because it will require:
- Fixing packaging in this repo
- Fixing packaging in the dotnet/core-setup repo (although this might go away)
- Fixing the dotnet/sdk repo to reflect name changes.
After a chat with @davidwrighton yesterday, we realized that it would make more sense to just assume crossgen2 will be renamed to crossgen in the future when the current crossgen retires, and doing the rename right now aligns us with the most likely long term plan. Plus, we wouldn't have to fix the SDK again in the future when we rename.
To address the confusion issue, i kept the output folder name unchanged, and just renamed the binary itself.
Fixes to the Linux arm/arm64 builds. Fix CI test failure.
cc @sergiy-k |
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.
Packaging infra LGTM.
I had an offline discussion with @MichalStrehovsky regarding the renaming and he pointed out that the SuperILC tool needs to be fixed too. It started to look like the value of a rename at this point was less than the confusion that could result. |
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
|
||
<!-- We're binplacing these into an existing publish layout so that F5 build in VS updates | ||
the same bits tests expect to see in bin/crossgen2. That way we never need to wonder which | ||
binaries are up to date and which are stale. --> | ||
<OutputPath>$(BinDir)/crossgen2</OutputPath> |
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.
Can we leave the conditioned OutputPath in the other projects (like in crossgen2.csproj)?
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.
There is no need for those. Building the main crossgen2 project takes care of putting these dependent files in the correct place (one of the scenarios I tested from VS)
This requires us to manually emit a runtimeconfig json for now, since the build produces a self-contained version of crossgen2.
Also includes some minor cleanups to the way we build crossgen2:
The crossgen2 tools folder will include the following files: