[sysprof] meson: fix linker checks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] meson: fix linker checks
- Date: Tue, 9 Oct 2018 00:50:04 +0000 (UTC)
commit f4870fdd389b37909c00bcf54d1ae0c69b1c518a
Author: Christian Hergert <chergert redhat com>
Date: Mon Oct 8 17:45:55 2018 -0700
meson: fix linker checks
meson.build | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 285d3a3..5401238 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 <stdatomic.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]