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

Support: allow building with non-C/C++ language linkers #65634

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Sep 7, 2023

When building with Swift as the linker language, CMake will use the Swift driver to perform the link oepration. The flags here are not marked to be interpreted by the linker as the default behaviour with MSVC is to use link directly rather than through a linker driver. For simplicity's sake and as an immediate solution to these flags being passed to the driver, avoid the delay load with Swift. A more comprehensive solution would be to pass these flags via -Xlinker when building with Swift.

@compnerd compnerd requested a review from a team September 7, 2023 16:28
Copy link
Collaborator

@tru tru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM. I think we need to make sure that generator expression is evaluated correctly on CMake 3.20. Maybe a comment in the code could be good.

llvm/lib/Support/CMakeLists.txt Outdated Show resolved Hide resolved
When building with Swift as the linker language, CMake will use the
Swift driver to perform the link oepration.  The flags here are not
marked to be interpreted by the linker as the default behaviour with
MSVC is to use `link` directly rather than through a linker driver.
For simplicity's sake and as an immediate solution to these flags being
passed to the driver, avoid the delay load with Swift.  A more
comprehensive solution would be to pass these flags via `-Xlinker` when
building with Swift.
@compnerd compnerd merged commit ecbd523 into llvm:main Sep 8, 2023
2 checks passed
@compnerd compnerd deleted the linker-options branch September 8, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants