Skip to content

Conversation

@finagolfin
Copy link
Member

@finagolfin finagolfin commented Dec 12, 2021

Cherrypick of #36917

Explanation: This pull consists of a handful of build-script changes that enable cross-compiling later Python build-script products like SPM and swift-driver for non-Darwin hosts, just as is currently possible when cross-compiling the toolchain for macOS arm64, including generating a cross-compilation destination JSON config file to use with SPM for Android. Most of the pull is scoped to non-Darwin cross-compilation or specifically to Android, with the exception of some install prefix refactoring, because cross-compilation for non-Darwin hosts installs the toolchains separately under a directory named for each host.

Scope: Since this is only build-related and mostly for non-Darwin cross-compilation, most is not even run on the CI, with the exception of the install prefix refactoring.

SR Issue: None

Risk: Almost none, only the simple install prefix changes even affect the normal host builds.

Testing: I've been using earlier versions of this pull for a while to cross-compile the toolchain for Android and recently added it to my Android CI so I can cross-compile SPM for Android with every trunk snapshot.

Reviewer: @gottesmm

@finagolfin
Copy link
Member Author

@gottesmm, can we can get this in before the 5.6 release?

…sts too

To that end, move the --cross-compile-deps-path flag from build-script-impl to a
publicly documented build-script flag and use it for build-script products'
library dependencies too. Generate a SPM destination JSON file that can be used
both for cross-compiling these build-script products and by users for their own
Swift packages.

Also, add a native_toolchain_path() method, that uses a prebuilt toolchain if
available, and pass an install prefix in to swift-driver and sourcekit-lsp.
@finagolfin
Copy link
Member Author

Closing since I was told only regressions or bugfixes wIll be accepted into the release branch after the release shipped, though I did submit this months prior.

@finagolfin finagolfin closed this Apr 19, 2022
@finagolfin finagolfin deleted the 5.6 branch September 25, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant