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

Split the Runtime Shared Framework project and combine legs in the official build #111136

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

jkoritzinsky
Copy link
Member

Split the Microsoft.NETCore.App.Runtime.sfxproj project into three separate projects, one for each runtime (CoreCLR, Mono, NativeAOT).

This makes some of the logic easier to reason about as settings specific to one runtime can be isolated in that project file.
The main benefit though, is that splitting the project allows us to build multiple "Runtime shared frameworks" in a single build invocation.

This PR also adds a BuildAllRuntimePacks property that builds all runtime packs that are supported for the given target. It also enables building the Mono CrossAOT compiler that runs on the target (targeting all RIDs supported for a CrossAOT compiler running on that target).

These changes allow us to reduce the number of legs in our official build's Build stage from 79 to 41 by enabling us to deduplicate all builds for a given platform except for Mono LLVMAOT for desktop, CoreCLR PGO-instrumented, and Wasm single threaded vs multithreaded.

Once this flows to the VMR, we can do similar deduplication in the VMR and significantly reduce the lanes there as well using the DotNetBuildAllRuntimePacks property (also added in this PR).

…ework projects that are hard-coded to specific runtimes.
…NativeAOT or singlefile instead of building a tool pack like how we build a runtime pack.
This was added for crossgen1, which we no longer ship.
… to get BuildAllRuntimePacks working locally on Windows x64
…ow has an alternative solution for the product all-up).
… default subsets are calculated for linux-bionic
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Member

Choose a reason for hiding this comment

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

Unrelated but we should rename this project as it conflicts with src/libraries/pretest.proj (which causes binclashes in the obj directory -> project.assets.json).

eng/DotNetBuild.props Outdated Show resolved Hide resolved
Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

Could we make BuildAllRuntimePacks / DotNetBuildAllRuntimePacks the default behavior? If we already build the runtimes, why not also pack them by default?

@jkoritzinsky
Copy link
Member Author

Could we make BuildAllRuntimePacks / DotNetBuildAllRuntimePacks the default behavior? If we already build the runtimes, why not also pack them by default?

I can try to take a look at this (having the various sfxproj projects opt-in based on which runtime subsets are built). I'm just worried about breaking the local dev workflow.

@jkoritzinsky
Copy link
Member Author

I'd like to defer making BuildAllRuntimePacks the default behavior until after this has flowed to the VMR and we can remove BuildNativeAOTRuntimePack and BuildMonoAOTCrossCompilerOnly. That will allow us to make the matrix simpler.

@ViktorHofer
Copy link
Member

I'd like to defer making BuildAllRuntimePacks the default behavior

Of course. I think it's the right default but doesn't need to happen now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants