Details
Description
The swiftc tool should have a compiler flag that prints the supported Swift versions (suitable for passing to -swift-version) in a stable machine-readable format. AFAICT right now the only way to list all supported versions is to pass an invalid major version and read the error message (which isn't a stable machine-readable format, it's a human-readable string).
The use-case here is automated tooling that needs to select among a set of supported Swift versions to specify (e.g. CocoaPods generating an xcodeproj).