[gobject-introspection] Pass in LDFLAGS to the dumper
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Pass in LDFLAGS to the dumper
- Date: Mon, 9 Apr 2012 15:13:05 +0000 (UTC)
commit e63866c2aea4338667a7e86c46f05864a991000d
Author: Johan Dahlin <johan gnome org>
Date: Mon Apr 9 12:12:00 2012 -0300
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
giscanner/dumper.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index baa51a9..7e103a6 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]