Skip to content

[build] Make the new --cross-compile-build-swift-tools flag public #83422

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

finagolfin
Copy link
Member

@finagolfin finagolfin commented Jul 30, 2025

This new flag makes it easy to build Swift cross-compilation toolchains, by disabling cross-compilation of all host tools, like the Swift compiler and various macros, building on prior pulls #38441 and #82163.

Native compilation has more fine-grained flags like --build-swift-tools, --build-llvm, and --swift-testing-macros, but those will disable building them for all platforms (with the exception of --build-swift-tools, which I modified to only apply for the host, since the initial introduction of this --cross-compile-build-swift-tools flag a couple months ago), so they're not suited for building a cross-compilation toolchain, where you want all host tools built for the native host but not for any cross-compilation SDKs.

@finagolfin
Copy link
Member Author

@swift-ci smoke test

@finagolfin
Copy link
Member Author

@swift-ci smoke test

@finagolfin
Copy link
Member Author

Added a validation test and rebased

@swift-ci smoke test linux

@finagolfin
Copy link
Member Author

@swift-ci smoke test macos

# UNSUPPORTED: OS=ios
# UNSUPPORTED: OS=tvos
# UNSUPPORTED: OS=watchos
# UNSUPPORTED: OS=xros
Copy link
Member Author

@finagolfin finagolfin Aug 2, 2025

Choose a reason for hiding this comment

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

@artemcm, these build system tests were disabled on remote CI like iOS or Android two years ago, which is why I can remove these then redundant lines in this single test, but you disabled xros after that lit.local.cfg was added: are these tests being run natively on xros, so I need to keep this test disabled there?

Copy link
Member Author

@finagolfin finagolfin Aug 3, 2025

Choose a reason for hiding this comment

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

Never mind, looks like these are still run for the iPhone simulator, so reverting this change of platforms for this one test.

@finagolfin finagolfin force-pushed the cross-flag branch 2 times, most recently from 489845a to 47815fd Compare August 2, 2025 10:02
@finagolfin
Copy link
Member Author

@swift-ci smoke test

@finagolfin
Copy link
Member Author

@swift-ci smoke test macos

@finagolfin
Copy link
Member Author

@swift-ci smoke test macos

@finagolfin
Copy link
Member Author

@swift-ci smoke test macos

@finagolfin
Copy link
Member Author

@swift-ci smoke test linux

@finagolfin
Copy link
Member Author

@swift-ci smoke test windows

This new flag makes it easy to build Swift cross-compilation toolchains, by
disabling cross-compilation of all host tools, like the Swift compiler and
various macros, building on prior pulls swiftlang#38441 and swiftlang#82163.

Also, add two class methods to the Testing macros product so it works with swiftlang#83260.
@finagolfin
Copy link
Member Author

@swift-ci test

@finagolfin
Copy link
Member Author

@edymtt, would you review?

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