From 1efcca637b70ad5e3f2bac035b7ebe497b18080a Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 25 Sep 2018 12:30:03 +0100 Subject: gtkdochelper: show full command if it fails Instead of showing just the command invoked, it's useful when debugging to also show all of the arguments. --- mesonbuild/scripts/gtkdochelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py index 04b4deb..01ced5b 100644 --- a/mesonbuild/scripts/gtkdochelper.py +++ b/mesonbuild/scripts/gtkdochelper.py @@ -66,7 +66,7 @@ def gtkdoc_run_check(cmd, cwd, library_paths=None): # This preserves the order of messages. p, out = Popen_safe(cmd, cwd=cwd, env=env, stderr=subprocess.STDOUT)[0:2] if p.returncode != 0: - err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)] + err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)] if out: err_msg.append(out) raise MesonException('\n'.join(err_msg)) -- cgit v1.1 From 47d115f6a87654e393b2e8c5ccf485e862250860 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 25 Sep 2018 12:15:27 +0100 Subject: gnome: add missing cflags/ldflags to gtk-doc when cross-compiling When cross-compiling the gtk-doc calls were missing the configured c_args and c_link_args. --- mesonbuild/modules/gnome.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 5128de4..a7452a4 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1012,6 +1012,8 @@ This will become a hard error in the future.''') ldflags.update(external_ldflags) if state.environment.is_cross_build(): + cflags.update(state.environment.cross_info.config["properties"].get('c_args', "")) + ldflags.update(state.environment.cross_info.config["properties"].get('c_link_args', "")) compiler = state.environment.coredata.cross_compilers.get('c') else: cflags.update(state.environment.coredata.get_external_args('c')) -- cgit v1.1 From fe981b0231e6ad26633277f2b656e886ffd1ea7a Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 25 Sep 2018 12:13:56 +0100 Subject: gnome: use target c_args/c_link_args for g-ir-scanner when cross-compiling When cross-compiling we shouldn't be passing the native c_args/c_link_args to g-ir-scanner. --- mesonbuild/modules/gnome.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index a7452a4..45b7eed 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -518,7 +518,12 @@ class GnomeModule(ExtensionModule): ret = [] for lang in langs: - for link_arg in state.environment.coredata.get_external_link_args(lang): + if state.environment.is_cross_build(): + link_args = state.environment.cross_info.config["properties"].get(lang + '_link_args', "") + else: + link_args = state.environment.coredata.get_external_link_args(lang) + + for link_arg in link_args: if link_arg.startswith('-L'): ret.append(link_arg) @@ -691,7 +696,10 @@ class GnomeModule(ExtensionModule): def _get_external_args_for_langs(self, state, langs): ret = [] for lang in langs: - ret += state.environment.coredata.get_external_args(lang) + if state.environment.is_cross_build(): + ret += state.environment.cross_info.config["properties"].get(lang + '_args', "") + else: + ret += state.environment.coredata.get_external_args(lang) return ret @staticmethod -- cgit v1.1