Skip to content

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.

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.
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.

2 participants