From f4870fdd389b37909c00bcf54d1ae0c69b1c518a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 8 Oct 2018 17:45:55 -0700 Subject: [PATCH] meson: fix linker checks --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 285d3a3d..54012389 100644 --- a/meson.build +++ b/meson.build @@ -122,12 +122,12 @@ if not get_option('buildtype').startswith('debug') ] endif -foreach arg: test_link_args - if cc.has_argument(arg) - global_link_args += arg +foreach link_arg: test_link_args + if cc.links('int main () { return 0; }', name: link_arg, args: link_arg) + global_link_args += link_arg endif endforeach -add_global_link_arguments(global_link_args, language: 'c') +add_project_link_arguments(global_link_args, language: 'c') if not cc.links(''' #include