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

[release/8.0-staging] Build fixes for Bionic on x64 #95382

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 29, 2023

Backport of #95313 to release/8.0-staging

/cc @MichalStrehovsky

Customer Impact

In .NET 8 we shipped experimental native AOT Bionic support as an experimental target. As such, it got less testing and it turns out it was pretty broken on x64 targets (the testing was done on arm64 only, which is more relevant for Android). There is however customer demand for x64 as well, see #94397 and #95223. This unblocks Bionic on x64.

Testing

Tested manually on Windows Subsystem for Android.

Risk

Low - these code paths are exclusive to the experimental x64 Bionic support that is completely unusable right now.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Fixes #93942. Works around #95223 (a better but more risky fix is in #95312, so I'm not going to resolve that with this PR).

The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild.

The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume `INLINE_GETTHREAD` could be a call so everything is setup for it.

I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with `FEATURE_EMULATED_TLS` enabled. All of this looks very non-risky so I'm going to ask for a backport.
@ghost
Copy link

ghost commented Nov 29, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #95313 to release/8.0-staging

/cc @MichalStrehovsky

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approved. we will take for consideration in 8.0.x

@MichalStrehovsky MichalStrehovsky added the Servicing-consider Issue for next servicing release review label Nov 29, 2023
@jeffschwMSFT jeffschwMSFT changed the title [release/8.0-staging] Fixes for Bionic on x64 [release/8.0-staging] Build fixes for Bionic on x64 Dec 7, 2023
@JulieLeeMSFT JulieLeeMSFT added this to the 8.0.x milestone Dec 12, 2023
@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.2 Dec 14, 2023
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Dec 14, 2023
@jeffschwMSFT jeffschwMSFT merged commit a29f2fa into release/8.0-staging Jan 2, 2024
110 of 115 checks passed
@jkotas jkotas deleted the backport/pr-95313-to-release/8.0-staging branch January 2, 2024 17:27
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants