summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2012-04-09 12:12:00 -0300
committerJohan Dahlin <jdahlin@litl.com>2012-04-09 12:12:00 -0300
commite63866c2aea4338667a7e86c46f05864a991000d (patch)
tree89bb83a90a87fcdb69b569716355457c52ccfd8c /giscanner
parentc8cfa7c6065f6c1f8ac97841fab5f49fd013ab33 (diff)
downloadgobject-introspection-e63866c2aea4338667a7e86c46f05864a991000d.tar.gz
Pass in LDFLAGS to the dumper
We should honor LDFLAGS environment variable set by the user, so options such as -Wl,--enable-new-dtags properly get passed to the linker when creating the dumper binary https://bugzilla.gnome.org/show_bug.cgi?id=670152
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/dumper.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index baa51a9f..7e103a69 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -190,10 +190,9 @@ class DumpCompiler(object):
args.append('-Wall')
pkgconfig_flags = self._run_pkgconfig('--cflags')
args.extend(pkgconfig_flags)
- cflags = os.environ.get('CFLAGS')
- if (cflags):
- for iflag in cflags.split():
- args.append(iflag)
+ cflags = os.environ.get('CFLAGS', '')
+ for cflag in cflags.split():
+ args.append(cflag)
for include in self._options.cpp_includes:
args.append('-I' + include)
args.extend(['-c', '-o', output])
@@ -229,10 +228,12 @@ class DumpCompiler(object):
else:
args.append('-export-dynamic')
- cflags = os.environ.get('CFLAGS')
- if (cflags):
- for iflag in cflags.split():
- args.append(iflag)
+ cflags = os.environ.get('CFLAGS', '')
+ for cflag in cflags.split():
+ args.append(cflag)
+ ldflags = os.environ.get('LDFLAGS', '')
+ for ldflag in ldflags.split():
+ 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