Add LINKER: prefix to link options

CMake will translate this to a compiler-specific flag to pass the flags
to the linker, e.g. for Clang: "-Xlinker", for GCC: "-Wl,". It worked so
far because Clang supports -Wl in the meantime too but we should prefer
the portable method.
This commit is contained in:
Robert Schulze 2022-05-12 22:53:09 +02:00
parent 7282b74403
commit 1ff7d245ed
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -427,7 +427,7 @@ endif ()
# Make this extra-checks for correct library dependencies.
if (OS_LINUX AND NOT SANITIZE)
target_link_options(global-group INTERFACE "-Wl,--no-undefined")
target_link_options(global-group INTERFACE "LINKER:--no-undefined")
endif ()
######################################