-
Notifications
You must be signed in to change notification settings - Fork 68
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
Allow using swiftc as the Swift Build linker driver #3
Comments
My thinking for a strategy that could make sense here as a reasonable behavior across all platforms is, for a given module:
Not sure how we could generalize that to other languages we may want to support in the future. |
@jakepetroules I think that we should continue to use |
Why clang for the pure ASM case? Wouldn't that potentially pull in unexpected dependencies? |
It is actually the inverse - it drops unnecessary dependencies - use of |
Sorry, I meant why use clang instead of ld for the pure ASM case? Wouldn't that pull in libc when you might not want it? |
Swift Build currently always uses clang as the linker driver, while SwiftPM has historically used swiftc. We should add a build setting clients can use to opt into using swiftc as the linker driver to ensure consistency where the two drivers have divergent behavior / command line flags. This will likely require some changes throughout the build system where we currently make assumptions about flags the linker driver accepts, and especially how we escape flags to pass them to the underlying linker.
The text was updated successfully, but these errors were encountered: