diff options
author | Marvin Scholz <epirat07@gmail.com> | 2022-03-30 17:05:23 +0200 |
---|---|---|
committer | Marvin Scholz <epirat07@gmail.com> | 2022-03-31 10:55:55 +0200 |
commit | 89620dc8e7f04c35dba6df10d4d6dc3e23facd91 (patch) | |
tree | 2002e2a57b99156abea8f584afc38ce8aa65a1d4 | |
parent | 1b03441bc46819f098e935370294fa88a544d7d0 (diff) | |
download | meson-89620dc8e7f04c35dba6df10d4d6dc3e23facd91.zip meson-89620dc8e7f04c35dba6df10d4d6dc3e23facd91.tar.gz meson-89620dc8e7f04c35dba6df10d4d6dc3e23facd91.tar.bz2 |
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.
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 2 |
1 files changed, 1 insertions, 1 deletions
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: |