From: Jan Janssen Date: Thu, 4 Nov 2021 18:03:45 +0000 (+0100) Subject: meson: Add --warn-common and --fatal-warnings to link flags X-Git-Tag: v250-rc1~332 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42e3bb357c62b45e2acf8f5e3a3c5a16781956f5;p=thirdparty%2Fsystemd.git meson: Add --warn-common and --fatal-warnings to link flags --- diff --git a/meson.build b/meson.build index f1be04e5aea..cf10dd82c80 100644 --- a/meson.build +++ b/meson.build @@ -387,11 +387,16 @@ endif # --as-needed and --no-undefined are provided by meson by default, # run 'meson configure' to see what is enabled possible_link_flags = [ - '-Wl,-z,relro', + '-Wl,--fatal-warnings', '-Wl,-z,now', + '-Wl,-z,relro', '-fstack-protector', ] +if get_option('b_sanitize') == 'none' + possible_link_flags += '-Wl,--warn-common' +endif + if cc.get_id() == 'clang' possible_common_cc_flags += [ '-Wno-typedef-redefinition',