-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use live apphost build in crossgen2 #66866
Comments
Tagging subscribers to this area: @hoyosjs Issue DetailsCG2 sets
The non-MSFT package maintainers have option to build custom apphost package and push it to their nuget feed (e.g. local file system or organization nuget server), then add that feed in NuGet.config to use the custom apphost. Line 10 in 59b5585
On community-supported platforms, such as FreeBSD, similar approach is used to build CG2 binary (since there is no microsoft.netcore.app.crossgen2.freebsd-x64.<version>.nupkg availabe in runtime's official nuget feed). However, when cross-compiling CG2 on FreeBSD in CI, we have disabled CG2 because we don't use multi-stage build (i.e. first build apphost, publish it to local nuget feed, then build the product with that apphost).
Therefore, if we use live-build of apphost in CG2 build, at least on community platforms; similar to what was done for testhost: runtime/src/libraries/externals.csproj Line 12 in 79026a5
we can avoid the multi-stage build overhead and bring community platforms on the same plan as the official ones (as far as CG2 is concerned).
|
Just a note that the north star is to build crossgen2 with NativeAOT: #65948 is already enabling this for some platforms. No apphost needed for NativeAOT. |
Great! Looks like even for platforms which currently do not support NativeAOT, with #65948 crossgen2 will be published as a self-contained, single file, application with live corehost which will essentially fix this issue. |
I believe this is fixed now |
CG2 sets
AppHostRuntimeIdentifier
which tells SDK to use specific platform apphost from prebuilt NuGet packages.runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
Line 6 in 59b5585
The non-MSFT package maintainers have option to build custom apphost package and push it to their nuget feed (e.g. local file system or organization nuget server), then add that feed in NuGet.config to use the custom apphost.
runtime/NuGet.config
Line 10 in 59b5585
On community-supported platforms, such as FreeBSD, similar approach is used to build CG2 binary (since there is no
microsoft.netcore.app.crossgen2.freebsd-x64.<version>.nupkg
availabe in runtime's official nuget feed). However, when cross-compiling CG2 on FreeBSD in CI, we have disabled CG2 because we don't use multi-stage build (i.e. first build apphost, publish it to local nuget feed, then build the product with that apphost).Therefore, if we use live-build of apphost in CG2 build, at least on community platforms; similar to what was done for testhost:
runtime/src/libraries/externals.csproj
Line 12 in 79026a5
we can avoid the multi-stage build overhead and bring community platforms on the same plan as the official ones (as far as CG2 is concerned).
The text was updated successfully, but these errors were encountered: