FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Cherry-pick Swift toolchain changes from upstream by brentleyjones · Pull Request #2643 · bazelbuild/rules_apple · GitHub

Cherry-pick Swift toolchain changes from upstream - #2643

Merged
brentleyjones merged 1 commit into
masterfrom
bj/swift_toolchain
Feb 4, 2025
Merged

brentleyjones merged 1 commit into
masterfrom
bj/swift_toolchain

Conversation

brentleyjones commented Feb 4, 2025
edited
Loading

Copy link
Copy Markdown
Collaborator

brentleyjones referenced this pull request Feb 4, 2025
This is change 1 of _N_ to migrate the Swift build rules to use new-style Bazel toolchains. This change:

*   Updates the toolchain configuration rules to wrap the `SwiftToolchainInfo` provider in `platform_common.ToolchainInfo`, for future use by `toolchain()` rules.
*   Funnels all toolchain access through a new `swift_toolchain.get_toolchain()` function that looks up the toolchain using `ctx.toolchains`, falling back to the implicit attribute.

Since `ctx.toolchains` isn't defined yet, the second change is a no-op but it simplifies future parts of the migration.

PiperOrigin-RevId: 439638938
brentleyjones marked this pull request as draft February 4, 2025 15:08
brentleyjones changed the title Introduce the swift_common.get_toolchain helper function Cherry-pick Swift toolchain changes from upstream Feb 4, 2025
brentleyjones force-pushed the bj/swift_toolchain branch 3 times, most recently from 978278b to 201445b Compare February 4, 2025 15:44
brentleyjones marked this pull request as ready for review February 4, 2025 15:59
brentleyjones enabled auto-merge (squash) February 4, 2025 15:59

Copy link
Copy Markdown
Collaborator Author

This is needed for rules_apple to support the upcoming rules_swift 3.0.

73b248d and cba3ae0.

Signed-off-by: Brentley Jones <github@brentleyjones.com>
brentleyjones merged commit 6815737 into master Feb 4, 2025
brentleyjones deleted the bj/swift_toolchain branch February 4, 2025 19:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL