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] Fix x64 crossbuild on macOS arm64 #91635

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

janvorli
Copy link
Member

@janvorli janvorli commented Sep 5, 2023

Backport of #91413 to release/8.0

Customer Impact

When a customer attempts to do a cross build of .NET runtime for macOS x64 on macOS arm64, the build fails during cross tools build phase. It happens due to the cpufeatures.c/h using TARGET_XXX ifdefs instead of HOST_XXX ones.

Testing

Local cross build of the runtime on macOS arm64, local build on macOS x64 and local build on linux arm64.

Risk

Low, the change does not cause different CPU features being detected.

The cross build is failing due to the cpufeatures.c being compiled in.
This file tries to extract cpu features using cpuid / getauxval that
don't make sense to execute in the cross tools.

This change disables compiling the cpufeatures.c for cross build and
changes the JitGetProcessorFeatures to return zero in this case.
@janvorli janvorli added Servicing-consider Issue for next servicing release review area-VM-coreclr labels Sep 5, 2023
@janvorli janvorli added this to the 8.0.0 milestone Sep 5, 2023
@janvorli janvorli requested a review from jkotas September 5, 2023 20:12
@janvorli janvorli self-assigned this Sep 5, 2023
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. once ready this can be merged

@jkotas jkotas added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 6, 2023
@jkotas jkotas merged commit f4d24c5 into dotnet:release/8.0 Sep 6, 2023
182 of 188 checks passed
@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants