Allow omitting the target triple for swift sdk configure #8856
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You can now run
swift sdk configure --sdk-root-path /some/sdk/root sdk-id
without needing to specify the target tripleMotivation:
The Android SDK (swiftlang/swift#80788 (comment)) needs to have its
sdkRootPath
configured to point to an external NDK sysroot. But it contains many different target triples, likearmv7-unknown-linux-androideabi33
andx86_64-unknown-linux-android29
, all of which need to be configured to point to the same sysroot. Following on to #8687 and swiftlang/swift-evolution#2888, this PR enables running a single command to configure the entire SDK, like so:This will result in configurations being created for each of the target triples for the SDK ID.
In addition, this fixes #8584, where
swift sdk configure
with a specified target triple didn't work at all, and instead would configure some random target triple for the specified SDK.Modifications:
Make the
targetTriple
flag forConfigureSwiftSDK
optional and, when nil, apply the command to all triples included in the specified SDK.Result:
Fixes #8584 and enables configuring multiple target triples with a single
swift sdk configure
command.