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
Preserve environment in tripleString(forPlatformVersion:)
#6834
Conversation
return """ | ||
\(self.archName)-\ | ||
\(self.vendorName)-\ | ||
\(self.osNameUnversioned)\(version) | ||
\(self.osNameUnversioned)\(version)\ | ||
\(self.environmentName.isEmpty ? "" : "-\(self.environmentName)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rauhul could you please confirm whether this is correct? Not sure if I'm missing anything else here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently on vacation and not critically thinking, however until im back (aug 28th) @artemcm may be able to provide some feedback.
tripleString(forPlatformVersion:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Looks good.
@swift-ci smoke test |
@swift-ci smoke test windows |
@MaxDesiatov this is ready to be merged? |
Preserve the
environmentName
part of triples when altering the OS version withTriple.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 theTriple.environmentName
.Modifications:
tripleString(forPlatformVersion:)
to includeself.environmentName
if it is non-empty.Result:
You can now build for the iOS simulator with
swift build --triple arm64-apple-ios-simulator --sdk "$(xcrun --sdk iphonesimulator --show-sdk-path)"
or if you also pull #6828, just