aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-23 14:58:21 -0300
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-23 15:00:19 -0300
commitf2a60b87cbc94a38f3482a7396c513f72b31fa3a (patch)
tree60aeb0452bf623ef7e0ee21bd76c5b7cec1e79ba
parenta83eb4ddb2f3468063af01e094c171b08c551cf7 (diff)
downloadmeson-f2a60b87cbc94a38f3482a7396c513f72b31fa3a.zip
meson-f2a60b87cbc94a38f3482a7396c513f72b31fa3a.tar.gz
meson-f2a60b87cbc94a38f3482a7396c513f72b31fa3a.tar.bz2
gnome: Fix g-ir-scanner linking args for all code paths
We were fixing them up only in the dependency code path and not in the InternalDependency one. Just make sure to do it once for all.
-rw-r--r--mesonbuild/modules/gnome.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 0a39664..1632dae 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -375,8 +375,6 @@ class GnomeModule(ExtensionModule):
# Hack to avoid passing some compiler options in
if lib.startswith("-W"):
continue
- if gir_has_extra_lib_arg() and use_gir_args and lib.startswith("-l"):
- lib = lib.replace('-l', '--extra-library=', 1)
ldflags.update([lib])
if isinstance(dep, PkgConfigDependency):
@@ -389,6 +387,14 @@ class GnomeModule(ExtensionModule):
mlog.log('dependency %s not handled to build gir files' % dep)
continue
+ if gir_has_extra_lib_arg() and use_gir_args:
+ fixed_ldflags = set()
+ for ldflag in ldflags:
+ if ldflag.startswith("-l"):
+ fixed_ldflags.add(ldflag.replace('-l', '--extra-library=', 1))
+ else:
+ fixed_ldflags.add(ldflag)
+ ldflags = fixed_ldflags
return cflags, ldflags, gi_includes
@permittedKwargs({'sources', 'nsversion', 'namespace', 'symbol_prefix', 'identifier_prefix',