[libgepub] Use compiler.has_link_argument() for linker flags



commit 034260487f6b72b668cdf93189ff8d830eab4b13
Author: Eddy Castillo <dyskette gmail com>
Date:   Wed Apr 3 23:04:51 2019 -0600

    Use compiler.has_link_argument() for linker flags
    
    WARNING: -Wl,--version-script,libgepub/gepub.map 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.

 libgepub/meson.build | 2 +-
 meson.build          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgepub/meson.build b/libgepub/meson.build
index 4485a5a..5e425c2 100644
--- a/libgepub/meson.build
+++ b/libgepub/meson.build
@@ -26,7 +26,7 @@ symbol_map = join_paths(meson.current_source_dir(), 'gepub.map')
 test_ldflag = '-Wl,--version-script,' + symbol_map
 ldflags = []
 
-if cc.has_argument(test_ldflag)
+if cc.has_link_argument(test_ldflag)
   ldflags += test_ldflag
 endif
 
diff --git a/meson.build b/meson.build
index a6488c0..0cd602f 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project(
   version: '0.6.0',
   license: 'LGPL2+',
   default_options: 'buildtype=debugoptimized',
-  meson_version: '>= 0.41.0'
+  meson_version: '>= 0.46.0'
 )
 
 gepub_version = meson.project_version()


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