[gcab] meson: use has_link_argument()



commit 95922f64a8386f1c981b5262c0b85a1d3e9a3608
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Jan 11 16:36:43 2019 +0400

    meson: use has_link_argument()
    
    Fixes:
    WARNING: -Wl,-z,relro 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. has_link_argument or other similar method 
can be used instead.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index d2f95dd..9f6675e 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
 project('gcab', 'c',
   version : '1.2',
   license : 'LGPL-2.1+',
-  meson_version : '>=0.37.0',
+  meson_version : '>=0.46.0',
   default_options : ['warning_level=2', 'c_std=c99'],
 )
 
@@ -81,7 +81,7 @@ test_link_args = [
   '-Wl,-z,now',
 ]
 foreach arg: test_link_args
-  if cc.has_argument(arg)
+  if cc.has_link_argument(arg)
     global_link_args += arg
   endif
 endforeach


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