Fix crosscompiling for x86_64 on ARM64 macOS#15001
Merged
BillyONeal merged 1 commit intomicrosoft:masterfrom Dec 9, 2020
Merged
Fix crosscompiling for x86_64 on ARM64 macOS#15001BillyONeal merged 1 commit intomicrosoft:masterfrom
BillyONeal merged 1 commit intomicrosoft:masterfrom
Conversation
b222eec to
e605719
Compare
Contributor
Author
|
It looks like there's a separate PR (#14716) for updating CMake (which looks to be the cause of some of the build failures/regressions), so I'll remove that commit from my branch and just include the triplet change here. |
e605719 to
96de55c
Compare
Contributor
|
I think for arm64, we need a new triplet instead of modifying it. @strega-nil Am I right? |
Contributor
Author
Apologies if I’m misunderstanding - there’s already an arm64-osx community triplet which in most cases works fine. This PR is for fixing compilation of x86_64 on an arm64 host, which in some cases may incorrectly produce arm64 binaries due to the macOS arch not being specified in the triplet. |
Contributor
|
This is a good change. |
strega-nil
approved these changes
Dec 9, 2020
Member
|
Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The x64-osx triplet does not explicitly specify the x86_64 architecture in the OSX_ARCHITECTURES variable. This means that CMake-based projects can in some cases incorrectly produce arm64 binaries instead of x86_64, if building on an arm64 platform.
I found an update of CMake was also necessary to incorporate some Apple Silicon-related fixes in order to build the ports I was having trouble with (libpng primarily, though there are additional issues with libpng that I will submit in a separate pull request).