[sysprof/wip/jtojnar/link-args] build: Check relro support using cc.has_link_argument



commit 601e9b7c37f9bcbd394a105ff4a97cc5527d4315
Author: Jan Tojnar <jtojnar gmail com>
Date:   Tue Oct 16 19:43:55 2018 +0200

    build: Check relro support using cc.has_link_argument
    
    Meson 0.45 added cc.has_link_argument, which allows us to get rid
    of the cc.links hack.

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 8150709..27c7c38 100644
--- a/meson.build
+++ b/meson.build
@@ -128,7 +128,7 @@ if not get_option('buildtype').startswith('debug')
 endif
 
 foreach link_arg: test_link_args
-  if cc.links('int main () { return 0; }', name: link_arg, args: link_arg)
+  if cc.has_link_argument(link_arg)
     global_link_args += link_arg
   endif
 endforeach


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]