-
Notifications
You must be signed in to change notification settings - Fork 196
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
Fix forwarding of -ld-path
to Clang
#1447
Fix forwarding of -ld-path
to Clang
#1447
Conversation
The Clang linker driver spells this as --ld-path so we can't forward the argument wholesale anymore, since we spell it -ld-path.
cc @compnerd @MaxDesiatov worth adding that combining |
ooc do we have any integration tests for this sort of thing? Seems like the exact type of situation that's super easy to accidentally regress (the |
-ld-path
to Clang
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.
There's the swift-integration-tests, but a local test in the test suite for the generated command seems best to me.
Consider this usage:
Should that execute /usr/bin/ld.told? Or /usr/bin/ld/told? Perhaps /usr/bin/ldtold? Path composition is not very clear and I don't see test cases that ensure this is correctly diagnosed and heavy fs checks (which will slow down compilation) to ensure correct handling. |
hmm should we handle that at the Swift Driver level or kick the can down the road to Clang though? iiuc Clang uses the |
@compnerd mind kicking off CI please? I can't since I don't have write perms. |
@swift-ci test |
@swift-ci test windows |
How does Clang handle this edge case right now? Does Clang document it explicitly? At the very least we should have it documented on our side, and tested if possible to do so. |
@MaxDesiatov @compnerd seems that Clang handles it the same way we currently do, i.e. without combining the flavor into the path:
This is somewhat covered by our tests since we assert that |
Sorry, I couldn't find this test, would you be able to provide a link to the exact line where this is covered? |
@MaxDesiatov sure, it's within |
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.
Thank you!
🙌 can we cherry-pick this into 5.10? I believe this needs to be fixed there too. |
Cherry-pick of #1447. The Clang linker driver spells this as `--ld-path` so we can't forward the argument wholesale anymore, since we spell it `-ld-path`. (cherry picked from commit 9a357ee) --------- Co-authored-by: Kabir Oberai <[email protected]>
This reverts commit 57d0a55 and PR #6939. Now that swiftlang/swift-driver#1447 and its 5.10 counterpart swiftlang/swift-driver#1454 were merged, we can reapply the fix for Swift SDKs linker metadata not being handled.
This reverts commit 57d0a55 and PR #6939. Now that swiftlang/swift-driver#1447 and its 5.10 counterpart swiftlang/swift-driver#1454 were merged, we can reapply the fix for Swift SDKs linker metadata not being handled. Resolves rdar://117049947.
The Clang linker driver spells this as
--ld-path
so we can't forward the argument wholesale anymore, since as of #1441 we spell it-ld-path
in the Swift Driver.