Skip to content

[5.3] Support cross compile Xcode toolchain for Apple Silicon #33780

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
merged 8 commits into from
Sep 10, 2020

Conversation

shahmishal
Copy link
Member

(cherry picked from commit bf7c03b)

Master PR - #33490

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to LLVM

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to cmark

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to lldb

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to llbuild

* Add llbuild CMake options array to provide DCMAKE_OSX_ARCHITECTURES

* [Build System] Use one install package for cross compile hosts

* Remove Lipo before non-build-script-impl products

* Add support to only lipo without running installable package tests

* [Build System] Support cross compile install prefix for SwiftPM product in Swift Build Support

* Use cross compile toolchain path for indexstoredb and swift-driver

* Use cross compile toolchain path for swiftpm, swiftsyntax, swiftformat, and skstresstester

* Add cross compile toolchain support to Benchmarks, and fix the python lint issue in skstresstester.py

* [SwiftPM] Add support for cross-compile-hosts flag to build swiftpm using bootstrap script

(cherry picked from commit bf7c03b)
@shahmishal shahmishal requested a review from a team as a code owner September 3, 2020 05:21
@shahmishal
Copy link
Member Author

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

The cherry-picked added DCMAKE_OSX_SYSROOT flag when it should not have.
@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

2 similar comments
@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

Should dramatically improve the size of the snapshost produced,
as we don't have stdlib et similia included twice. Also, it helps when
producing fat binaries, as we don't have to implement any mechanism
for sandwiching all the slices together.

(cherry picked from commit 8337f96)
@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal shahmishal requested a review from dcci September 4, 2020 17:52
@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

4 similar comments
@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain Linux

@shahmishal
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Sep 8, 2020

Build failed
Swift Test Linux Platform
Git Sha - c6acc42

@swift-ci
Copy link
Contributor

swift-ci commented Sep 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - c6acc42

@shahmishal
Copy link
Member Author

@swift-ci test macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

2 similar comments
@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

swiftlang/swift-llbuild#697

@swift-ci build toolchain macOS

@shahmishal
Copy link
Member Author

@shahmishal
Copy link
Member Author

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - eaef79c

Install command
tar -zxf swift-PR-33780-695-osx.tar.gz --directory ~/

@shahmishal shahmishal merged commit 45e46eb into release/5.3 Sep 10, 2020
@shahmishal shahmishal deleted the shahmishal/5.3/support-arm64-toolchain branch September 10, 2020 17:13
shahmishal added a commit that referenced this pull request Sep 10, 2020
* Support cross compile Xcode toolchain for Apple Silicon

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to LLVM

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to cmark

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to lldb

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to llbuild

* Add llbuild CMake options array to provide DCMAKE_OSX_ARCHITECTURES

* [Build System] Use one install package for cross compile hosts

* Remove Lipo before non-build-script-impl products

* Add support to only lipo without running installable package tests

* [Build System] Support cross compile install prefix for SwiftPM product in Swift Build Support

* Use cross compile toolchain path for indexstoredb and swift-driver

* Use cross compile toolchain path for swiftpm, swiftsyntax, swiftformat, and skstresstester

* Add cross compile toolchain support to Benchmarks, and fix the python lint issue in skstresstester.py

* [SwiftPM] Add support for cross-compile-hosts flag to build swiftpm using bootstrap script

(cherry picked from commit bf7c03b)

* Remove DCMAKE_OSX_SYSROOT from LLDB CMake flag

The cherry-picked added DCMAKE_OSX_SYSROOT flag when it should not have.

* Don't build SwiftUnitTests for cross compile host

(cherry picked from commit ceeb724)

* Don't run LLDB cross compile host test suite

(cherry picked from commit bb356d3)

* Remove compiler-rt from install targets for cross compile host

(cherry picked from commit 9adbace)

* [Package] When building a toolchain, don't copy the Resource directory.

Should dramatically improve the size of the snapshost produced,
as we don't have stdlib et similia included twice. Also, it helps when
producing fat binaries, as we don't have to implement any mechanism
for sandwiching all the slices together.

(cherry picked from commit 8337f96)

* Add missing imports for swiftpm in the products class

Co-authored-by: Davide Italiano <[email protected]>
(cherry picked from commit 45e46eb)
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks and removed r5.3 labels Jan 8, 2023
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.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants