summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geiger <sbastig@gmx.net>2017-02-11 21:44:29 +0100
committerSebastian Geiger <sbastig@gmx.net>2017-03-26 14:23:11 +0200
commitd95834ca0e5ccaa00ea2d28129ca8e89d37641f7 (patch)
tree2243dd3369b52352e0a4dc3ca49d0d1b562449ff
parente714202055483286d77467ec7f393ad23c8683c8 (diff)
downloadgobject-introspection-d95834ca0e5ccaa00ea2d28129ca8e89d37641f7.tar.gz
g-ir-scanner: fix wrong order of -L options in libtool invocation
This patch fixes an issue in dumper.py, which causes a wrong oder of -L options to be passed to libtool. This in turn can cause build failures if old library files are present in the linked library directories. https://bugzilla.gnome.org/show_bug.cgi?id=778507
-rw-r--r--giscanner/dumper.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index f48fcc11..793177b0 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -237,8 +237,6 @@ class DumpCompiler(object):
args.append(cppflag)
for cflag in shlex.split(os.environ.get('CFLAGS', '')):
args.append(cflag)
- for ldflag in shlex.split(os.environ.get('LDFLAGS', '')):
- args.append(ldflag)
# Make sure to list the library to be introspected first since it's
# likely to be uninstalled yet and we want the uninstalled RPATHs have
@@ -267,6 +265,10 @@ class DumpCompiler(object):
libtool,
self._options.libraries)
+ if not self._compiler.check_is_msvc():
+ for ldflag in shlex.split(os.environ.get('LDFLAGS', '')):
+ args.append(ldflag)
+
if not libtool:
# non-libtool: prepare distutils for linking the introspection
# dumper program...