From d3ef01a4208a801acad380a4aaceb6a21f8fa603 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 bcf77b9..6a4b472 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -974,6 +974,10 @@ This will become a hard error in the future.''') args.append('--{}={}'.format(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)