From 89620dc8e7f04c35dba6df10d4d6dc3e23facd91 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Wed, 30 Mar 2022 17:05:23 +0200 Subject: clike: print stderr instead of stdout for debugging When something goes wrong with running the compiler in _symbols_have_underscore_prefix_searchbin, print stderr instead, as it actually contains helpful output while stdout is usually empty in this case. --- mesonbuild/compilers/mixins/clike.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers') diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 7044b4e..162005f 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -918,7 +918,7 @@ class CLikeCompiler(Compiler): n = '_symbols_have_underscore_prefix_searchbin' with self._build_wrapper(code, env, extra_args=args, mode='compile', want_output=True, temp_dir=env.scratch_dir) as p: if p.returncode != 0: - raise RuntimeError(f'BUG: Unable to compile {n!r} check: {p.stdout}') + raise RuntimeError(f'BUG: Unable to compile {n!r} check: {p.stderr}') if not os.path.isfile(p.output_name): raise RuntimeError(f'BUG: Can\'t find compiled test code for {n!r} check') with open(p.output_name, 'rb') as o: -- cgit v1.1