Skip to content

cmake: use 'LINKER:SHELL:' prefix for detecting version script support#15844

Merged
slouken merged 1 commit into
libsdl-org:mainfrom
madebr:cmake-link-options-version-script
Jun 17, 2026
Merged

cmake: use 'LINKER:SHELL:' prefix for detecting version script support#15844
slouken merged 1 commit into
libsdl-org:mainfrom
madebr:cmake-link-options-version-script

Conversation

@madebr

@madebr madebr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Use LINKER:SHELL: prefix for adding the version script.
This will automatically use switch between -Wl, and -Xlinker for gcc and clang.

This does not fix commas in paths as mentioned in #14384 though.
I don't think this is fixable in global.
Look at the doc page of CMAKE_LANG_LINKER_WRAPPER_FLAG: the SunPro toolchain only supports a comma as separator.

So don't use comma's in your build paths :)

Description

Existing Issue(s)

Fixes #14384 (by using -Xlinker for clang and -Wl, for gcc)

@slouken slouken merged commit 9228b91 into libsdl-org:main Jun 17, 2026
46 checks passed
@madebr madebr deleted the cmake-link-options-version-script branch June 17, 2026 13:52
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.

[CMake] Support for filepaths with a comma ,

2 participants