Skip to content

Conversation

dschaefer2
Copy link
Member

Prebuilts for macros and the automated downloading of SwiftSDKs need to know the version of the compiler so we can fetch compatible binaries. The swiftc compiler has a --print-target-info options which dumps out a JSON structure that contains the compilerVersion. We already use info in this structure to determine the hostTriple for the UserToolchain.

This adds the swiftCompilerVersion to UserToolchain that uses a couple of regex's to pull out the Swift compiler version. This is then used by the prebuilts feature instead of our current hardcodeing of the swift toolchain version.

This also turns the prebuilts feature on by default which was supposed to be done in the last update.

Cherry pick of #8707

Prebuilts for macros and the automated downloading of SwiftSDKs need to
know the version of the compiler so we can fetch compatible binaries.
The swiftc compiler has a --print-target-info options which dumps out a
JSON structure that contains the compilerVersion. We already use info in
this structure to determine the hostTriple for the UserToolchain.

This adds the swiftCompilerVersion to UserToolchain that uses a couple
of regex's to pull out the Swift compiler version. This is then used by
the prebuilts feature instead of our current hardcodeing of the swift
toolchain version.

This also turns the prebuilts feature on by default which was supposed
to be done in the last update.
@dschaefer2 dschaefer2 force-pushed the main-prebuilt-compiler-tag branch from 92831ae to 041b053 Compare May 23, 2025 14:03
@dschaefer2
Copy link
Member Author

@swift-ci please test windows

@dschaefer2 dschaefer2 enabled auto-merge (squash) May 24, 2025 05:24
@dschaefer2 dschaefer2 merged commit 99bd4ed into swiftlang:main May 24, 2025
6 checks passed
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.

2 participants