From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 4 Aug 2017 16:16:41 +0300 Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling Specifically: 1) Make it possible to specify a wrapper for executing binaries (usually, some kind of target hardware emulator, such as qemu) 2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will try to guess them, incorrectly. 3) If things break down, print the full command with arguments, not just the binary name. 4) Correctly determine the compiler/linker executables and cross-options when cross-compiling Upstream-Status: Pending Signed-off-by: Alexander Kanavin --- mesonbuild/modules/gnome.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index dc2979e..c9ff9bd 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule): args.append(f'--{program_name}={path}') if namespace: args.append('--namespace=' + namespace) + gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None) + if gtkdoc_exe_wrapper is not None: + args.append('--run=' + gtkdoc_exe_wrapper) + args += self._unpack_args('--htmlargs=', 'html_args', kwargs) args += self._unpack_args('--scanargs=', 'scan_args', kwargs) args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)