GNOME Bugzilla – Bug 794978
Meson: glib-networking uses get_support_arguments() on ldflags
Last modified: 2018-04-25 20:44:35 UTC
Meson configuration prints this warnings: WARNING: -Wl,--version-script,/home/xclaesse/programmation/glib-networking/glib-networking.map looks like a linker argument, but has_argument and other similar methods only support checking compiler arguments. Using them to check linker arguments are never supported, and results are likely to be wrong regardless of the compiler you are using. That's because cc.get_supported_arguments() is only for cflags not ldflags. That code is wrong: test_ldflag = '-Wl,--version-script,' + symbol_map module_ldflags += cc.get_supported_arguments(test_ldflag) There is currently no API in meson to test for link flags. I made a PR there: https://github.com/mesonbuild/meson/pull/3353
Created attachment 371300 [details] [review] Meson: Use get_supported_link_arguments() for '-Wl,' args Otherwise meson print warning because get_supported_arguments() tests if a code snippet compiles but not links. This uses new API added in meson 0.46.0.
Attachment 371300 [details] pushed as 452c085 - Meson: Use get_supported_link_arguments() for '-Wl,' args
Oops, pushed this one by error when pushing patch for bug #795043. I think this patch was OK too, right?
Yes, thanks!