Skip to content

[5.6][build] Make it easier to cross-compile the stdlib and use it #40976

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

Closed
wants to merge 2 commits into from

Conversation

finagolfin
Copy link
Member

Cherrypick of #40633 and #40707

Explanation: Cross-compiling the stdlib and using it as an external SDK, ie not within any toolchain, had these installation blemishes. The symlink to the clang headers would assume the stdlib was installed in a Swift toolchain alongside clang so it used a relative path before, but no longer does when building a standalone stdlib. It would also assume that the cross-compiled toolchain needed to be kept separate from a native one so it appended a subdirectory named after the cross-compile target to the install destdir, which I added a flag to disable.

Scope: This is all build-related and only used for cross-compilation, with most of it disabled by default because of the new build flag.

SR Issue: None

Risk: Low, disabled by default or for common build configurations

Testing: I apply both pulls on my daily Android CI when cross-compiling the stdlib.

Reviewer: @compnerd

@finagolfin finagolfin requested a review from a team as a code owner January 23, 2022 15:57
@finagolfin
Copy link
Member Author

@artemcm, would you run the CI on this?

@artemcm
Copy link
Contributor

artemcm commented Jan 24, 2022

@swift-ci please test

@finagolfin
Copy link
Member Author

Ping, @compnerd, can we get this in?

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that this should be safe - it has been on main for a bit.

@finagolfin
Copy link
Member Author

@airspeedswift, a tiny 5.6 pull that needs approval.

@finagolfin
Copy link
Member Author

@compnerd, mind just merging this, or do we need someone else's approval at this point?

…name to the install-destdir for a cross-compiled toolchain

This is useful if you're cross-compiling the toolchain for a single host and don't
want your specified install path modified.
@finagolfin
Copy link
Member Author

@airspeedswift, been waiting on approval for this for awhile, can we get this small build pull in?

@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 cross-stdlib branch September 25, 2022 05:57
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.

3 participants