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

Fix official build break #100624

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Fix official build break #100624

merged 1 commit into from
Apr 4, 2024

Conversation

MichalStrehovsky
Copy link
Member

#100512 caused an official build break by exposing a latent issue in how we build the managed artifacts. Official builds split managed and native builds for some reason. This is throwing off the heuristic that decides whether to use native AOT's corelib in build.

We were always using the native AOT's corelib in x64 and arm64 legs because of the thrown off heuristic. This apparently didn't cause an immediate problem there.

It causes a problem on x86 because crossgen2 is a trimmed+r2r+singlefile executable on x86 (and nowhere else) and ILLink execution doesn't like the layouts with UseNativeAotCoreLib.

Tweak the heuristic to not use native AOT corelib if we're building JIT corelib.

#100512 caused an official build break by exposing a latent issue in how we build the managed artifacts. Official builds split managed and native builds for some reason. This is throwing off the heuristic that decides whether to use native AOT's corelib in build.

We were always using the native AOT's corelib in x64 and arm64 legs because of the thrown off heuristic. This apparently didn't cause an immediate problem there.

It causes a problem on x86 because crossgen2 is a trimmed+r2r+singlefile executable on x86 (and nowhere else) and ILLink execution doesn't like the layouts with `UseNativeAotCoreLib`.

Tweak the heuristic to not use native AOT corelib if we're building JIT corelib.
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 4, 2024
@MichalStrehovsky
Copy link
Member Author

Cc @dotnet/ilc-contrib @dotnet/runtime-infrastructure if anyone is around to sign off. Official builds are broken. Would appreciate if we can merge before someone gets impacted by this.

@ViktorHofer
Copy link
Member

Official builds split managed and native builds for some reason.

Can you please elaborate on what you mean by that?

@MichalStrehovsky
Copy link
Member Author

Official builds split managed and native builds for some reason.

Can you please elaborate on what you mean by that?

Instead of doing a single build.cmd invocation to build stuff, they execute:

D:\a\_work\1\s\build.cmd -ci -arch x86 -os windows  -s clr.runtime+clr.alljits+clr.nativeaotruntime -c Release /bl:D:\a\_work\1\s/artifacts/logs/Release/CoreClrNativeBuild.binlog /p:OfficialBuildId=20240403.10  

Followed by:

D:\a\_work\1\s\build.cmd -ci -arch x86 -os windows  -s clr.corelib+clr.nativecorelib+clr.nativeaotlibs+clr.tools+clr.packages+libs+host+packs -c Release /p:OfficialBuildId=20240403.10 

It's not clear to me why it's two steps. We just don't want the binlog? (Why?)

@ViktorHofer
Copy link
Member

Good question. @jkoritzinsky do you know the answer to that?

@MichalStrehovsky MichalStrehovsky merged commit e4d9e41 into main Apr 4, 2024
150 of 152 checks passed
@MichalStrehovsky MichalStrehovsky deleted the MichalStrehovsky-patch-1 branch April 4, 2024 08:57
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
dotnet#100512 caused an official build break by exposing a latent issue in how we build the managed artifacts. Official builds split managed and native builds for some reason. This is throwing off the heuristic that decides whether to use native AOT's corelib in build.

We were always using the native AOT's corelib in x64 and arm64 legs because of the thrown off heuristic. This apparently didn't cause an immediate problem there.

It causes a problem on x86 because crossgen2 is a trimmed+r2r+singlefile executable on x86 (and nowhere else) and ILLink execution doesn't like the layouts with `UseNativeAotCoreLib`.

Tweak the heuristic to not use native AOT corelib if we're building JIT corelib.
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants