-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add two-stage build support in source-build #112414
Conversation
@am11, instead of hooking up the multistage build to SB/VMR like this, we'd like it to have the following UX: In the eng/build.sh and eng/build.ps1 scripts, provide the following arguments:
Then, in the VMR, we can add support for a Can you update this PR (and the one in dotnet/sdk) to reflect this UX? |
The approach makes lot of sense but I am not sure if it is the right "granularity". Bootstraping runtime alone and manipulating nuget source feed paths manually is not very smooth. If we bootstrap VMR (dotnet/dotnet) and then use that bootstrapped SDK to build the product again, that makes more sense. i.e. revive https://github.com/dotnet/source-build/blob/main/Documentation/bootstrapping-guidelines.md and cover With current state of this PR, user can simulate bootstrapping by rerunning VMR build.sh and pointing to the previously built SDK by two-stage process. TL;DR we should definitely think about bootstrapping more holistically. Meanwhile, these two tiny PRs in rutnime and sdk are unblocking community platform source-build which is stuck for months. The bootstrap solution can revert this stop-gap solution once it arrives (which may happen in weeks, may take months or longer..). |
@jkoritzinsky do you think we can take these two (total of 30 LOC) PRs to fix the community platforms source-build and later tackle the bootstrap user-story? (which will take a lot more work than 30 lines because that solution doesn't exist!) cc @jkotas this is a regression fix for community platform source-build. We cannot build net10.0 preview 1 without it. |
I do not have much else to say than what I have said for the previous PR in this series #105004 (comment) . I am sympathetic to the concerns of the build system maintainers about where this series is going.
I am sorry about that There are a lot of changes going into the build system as we are preparing to switch our official builds over to use VMR. It is likely that source builds for community targets will need local patches throughout .NET 10 previews.
Current Stage2 build is closer to |
@jkotas, thank you for the clarification. This is just a short term stop-gap solution to propagate stage options from VMR to runtime. Granted it isn't pretty but it's a tiny hook to use what runtime's CI exercises. https://github.com/dotnet/source-build/ repo has an existing concept of I think, in long run, it would be a good idea if we take @jkoritzinsky's proposal into consideration in light of those existing facilities (preferably without introducing new options to top-level SB). |
The source-build for community platforms are also running into LKG issue, for which we added TwoStage build support filipnavara/dotnet-riscv#4. This PR exposes two-stage build properties (StageOneBuild and StageTwoBuild) for source-build so we can build the product end-to-end for community platforms.
Also,
Microsoft.NETCore.App.Runtime.CoreCLR
tries to run crossgen2, which runs into invalid binary. Disabling it for StageTwoBuild for now as it's also disabled for FreeBSD etc.