hughsie/colord

Using cc.has_argument to check linker flags always fails with clang

Closed this issue · 0 comments

meson console output:

Native C compiler: clang (clang 4.0.0)
Compiler for C supports argument -Wl,-z,relro: NO
Compiler for C supports argument -Wl,-z,now: NO

meson-log.txt

clang: error: -Wl,-z,relro: 'linker' input unused [-Werror,-Wunused-command-line-argument]
clang: error: -Wl,-z,now: 'linker' input unused [-Werror,-Wunused-command-line-argument]

Unfortunately, I don't know any clean solution other than asking.meson to add a cc.has_link_argument method. It may be possible to do the check with cc.links manually, but I haven't checked it myself.