diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-01-13 19:01:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-13 19:01:26 +0200 |
commit | 933eaf602268dc5b20a90aed13b4d832a18047d6 (patch) | |
tree | 09400eb3d446aa044b92e546531f5347cc8b41f9 /mesonbuild/modules/gnome.py | |
parent | d6bed2a77df7f7ff4512fd1be6333420d84b71b8 (diff) | |
parent | 9ec950c4ae5281336d4f7804dcf52943860d5d32 (diff) | |
download | meson-933eaf602268dc5b20a90aed13b4d832a18047d6.zip meson-933eaf602268dc5b20a90aed13b4d832a18047d6.tar.gz meson-933eaf602268dc5b20a90aed13b4d832a18047d6.tar.bz2 |
Merge pull request #2800 from lantw44/master
Fix -L order, LDFLAGS, LD_LIBRARY_PATH issues in GNOME module
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index ad99c14..db85420 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -372,7 +372,7 @@ class GnomeModule(ExtensionModule): continue if gir_has_extra_lib_arg() and use_gir_args: - fixed_ldflags = set() + fixed_ldflags = OrderedSet() for ldflag in ldflags: if ldflag.startswith("-l"): fixed_ldflags.add(ldflag.replace('-l', '--extra-library=', 1)) @@ -565,6 +565,7 @@ class GnomeModule(ExtensionModule): ldflags += list(dep_ldflags) scan_command += ['--cflags-begin'] scan_command += cflags + scan_command += state.environment.coredata.external_args[lang] scan_command += ['--cflags-end'] # need to put our output directory first as we need to use the # generated libraries instead of any possibly installed system/prefix @@ -595,6 +596,11 @@ class GnomeModule(ExtensionModule): d = os.path.join(state.environment.get_build_dir(), d) scan_command.append('-L' + d) scan_command += ['--library', libname] + + for link_arg in state.environment.coredata.external_link_args[lang]: + if link_arg.startswith('-L'): + scan_command.append(link_arg) + scankwargs = {'output': girfile, 'command': scan_command, 'depends': depends} @@ -823,6 +829,8 @@ This will become a hard error in the future.''') raise MesonException( 'Gir include dirs should be include_directories().') cflags.update(get_include_args(inc_dirs)) + cflags.update(state.environment.coredata.external_args['c']) + ldflags.update(state.environment.coredata.external_link_args['c']) if cflags: args += ['--cflags=%s' % ' '.join(cflags)] if ldflags: |