[cmake-developers] CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS and CMP0065
Stephen Kelly
steveire at gmail.com
Thu Oct 6 15:46:20 EDT 2016
Brad King wrote:
>>>> out of place in cmLocalGenerator. If it were returned from
>>>> cli.GetItems,
>>>
>>> Yes, it could be moved.
>>
>> Ok. I might look into that.
>
> It looks like OutputLinkLibraries currently puts the flag in the
> linkLibs (which goes to the <LINK_LIBRARIES> placeholder) but it
> would more sensibly be located in the linkFlags (which goes to
> the <LINK_FLAGS> placeholder). If we do clean this up it should
> be moved to <LINK_FLAGS>. Therefore it should not go in GetItems,
> but instead in a separate helper that all generators can share.
Do you know what CMAKE_EXE_EXPORTS_${lang}_FLAG is? It is added to the
linkFlags already for executables with exports.
For Linux, it contains
"-Wl,--export-dynamic"
CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS contains
"-rdynamic"
for Linux-GNU.
According to
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
rdynamic means:
"Pass the flag -export-dynamic to the ELF linker, on targets that support
it."
Is CMP0065 adding redundant flags?
Thanks,
Steve.
More information about the cmake-developers
mailing list