Skip to content

Conversation

camio
Copy link
Contributor

@camio camio commented Oct 3, 2024

Clang and GCC's -Wl argument can be used to pass arguments to the linker.
MSVC, however, does not recognize this option and instead uses a
/link flag at the end of all other arguments for this purpose. This commit
makes use of "/link" with MSVC when LDFLAGS are used.

A test was added that verifies this functionality by setting the
executable's stack size and verifying the change from the generated
executable.

Fixes #8

@camio camio force-pushed the fix-ldflags-msvc branch from ff810c6 to 2c66326 Compare October 3, 2024 20:21
Clang and GCC's `-Wl` argument can be used to pass arguments to the linker.
MSVC, however, does not recognize this option and instead uses a
/link flag at the end of all other arguments for this purpose. This commit
makes use of "/link" with MSVC when LDFLAGS are used.
@camio camio force-pushed the fix-ldflags-msvc branch from 2c66326 to 1e9aa1a Compare October 3, 2024 20:25
@camio camio marked this pull request as ready for review October 3, 2024 20:26
Copy link
Owner

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you very much for the test!

@Hywan
Copy link
Owner

Hywan commented Oct 7, 2024

I've reverted the PR as the CI is failing, see #25

@Hywan
Copy link
Owner

Hywan commented Oct 7, 2024

Fixed in #26

@camio camio deleted the fix-ldflags-msvc branch October 7, 2024 18:50
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.

LDFLAGS mapping breaks on msvc
2 participants