Skip to content

[5.5][build] explicitly set OSX_ARCHITECTURES for targets in stdlib #38445

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

Merged

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Jul 16, 2021

Our custom build code already sets the architecture of compilation
commands by different means, and so far we were relying on setting
CMAKE_OSX_ARCHITECTURES to an empty value to avoid CMake doing the
same.

However, on Apple Silicon, CMake 3.19+ enforces a default value in this
scenario
(https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5291/diffs),
and this would result in the inability to compile code for x86_64.

Cherry-pick of #38415, #38444

Addresses SR-14035, rdar://80699579

Our custom build code already sets the architecture of compilation
commands by different means, and so far we were relying on setting
`CMAKE_OSX_ARCHITECTURES` to an empty value to avoid CMake doing the
same.

However, on Apple Silicon, CMake 3.19+ enforces a default value in this
scenario
(https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5291/diffs),
and this would result in the inability to compile code for x86_64.

Cherry-pick of swiftlang#38415, swiftlang#38444

Addresses SR-14035, rdar://80699579
@edymtt edymtt added the r5.5 label Jul 16, 2021
@edymtt edymtt requested a review from a team as a code owner July 16, 2021 20:14
@edymtt
Copy link
Contributor Author

edymtt commented Jul 16, 2021

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Jul 16, 2021

@swift-ci please test Apple Silicon

@edymtt
Copy link
Contributor Author

edymtt commented Jul 16, 2021

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - a3d97ba

@edymtt
Copy link
Contributor Author

edymtt commented Jul 16, 2021

@swift-ci please test Linux

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - a3d97ba

Install command
tar zxf swift-PR-38445-629-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - a3d97ba

Install command
tar -zxf swift-PR-38445-1058-osx.tar.gz --directory ~/

@edymtt edymtt merged commit ed8f295 into swiftlang:release/5.5 Jul 19, 2021
@edymtt edymtt deleted the explicitly-set-osx-architecture-macos-5.5 branch July 19, 2021 15:11
@johnno1962
Copy link
Contributor

👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants