Skip to content
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

SwiftBuild should query SwiftDriver instead of executing swiftc --version for Swift compiler version information when using the integrated driver library #205

Open
cwakamo opened this issue Feb 21, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@cwakamo
Copy link

cwakamo commented Feb 21, 2025

SwiftBuild currently executes swiftc --version to get Swift compiler version information early in its execution. However, SwiftDriver can provide this information as well (it has access to it from libSwiftScan's swiftscan_compiler_target_info_query_v2 function). To minimize process spawns, and to avoid needing to use the swiftc binary when it otherwise wouldn't be used, SwiftBuild should query SwiftDriver for this information when the integrated driver library is in use.

@cwakamo cwakamo added the enhancement New feature or request label Feb 21, 2025
@cwakamo
Copy link
Author

cwakamo commented Feb 21, 2025

It looks like SwiftDriver has this information, but doesn't expose it in its API surface. Assuming we wanted to do this in SwiftBuild, I don't think it would be unreasonable to add an API to SwiftDriver to get this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant