summaryrefslogtreecommitdiff
path: root/giscanner/gdumpparser.py
diff options
context:
space:
mode:
authorNicola Fontana <ntd@entidi.it>2015-03-23 22:04:32 +0100
committerColin Walters <walters@verbum.org>2016-02-16 16:12:37 -0500
commitb638438e874fa437adff3bb0480710fe5cbe120c (patch)
tree4ee1b3435e104a505f439f51fb3e793811643e90 /giscanner/gdumpparser.py
parent45757373ced1b50b183fb6cff44f1e6859d8cfb9 (diff)
downloadgobject-introspection-b638438e874fa437adff3bb0480710fe5cbe120c.tar.gz
Use a launcher for executing g-ir-scanner
In cross-compilation the build system is unable to execute the compiled binary. Give the possibility to use a launcher, e.g. wine for MinGW or qemu for different CPU type. https://bugzilla.gnome.org/show_bug.cgi?id=696773
Diffstat (limited to 'giscanner/gdumpparser.py')
-rw-r--r--giscanner/gdumpparser.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
index 9bdc2bc1..1134f33e 100644
--- a/giscanner/gdumpparser.py
+++ b/giscanner/gdumpparser.py
@@ -162,6 +162,12 @@ blob containing data gleaned from GObject's primitive introspection."""
out_path = os.path.join(self._binary.tmpdir, 'dump.xml')
args = []
+
+ # Prepend the launcher command and arguments, if defined
+ launcher = os.environ.get('GI_CROSS_LAUNCHER')
+ if launcher:
+ args.extend(launcher.split())
+
args.extend(self._binary.args)
args.append('--introspect-dump=%s,%s' % (in_path, out_path))