You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserve env in tripleString(forPlatformVersion:) (#6834)
Preserve the `environmentName` part of triples when altering the OS version with `Triple.tripleString(forPlatformVersion:)`
### Motivation:
Building for the iOS simulator (and presumably anything other triple with a fourth component) would fail because we would generate the wrong swiftc/clang `-target`, incorrectly excluding the `Triple.environmentName`.
### Modifications:
- Modify `tripleString(forPlatformVersion:)` to include `self.environmentName` if it is non-empty.
### Result:
You can now build for the iOS simulator with
```shell
swift build --triple arm64-apple-ios-simulator --sdk "$(xcrun --sdk iphonesimulator --show-sdk-path)"
```
or if you also pull #6828, just
```shell
swift build --triple arm64-apple-ios-simulator
```
0 commit comments