From 1f527550c6ac8462f67862d6cfa74340c159c975 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 12 Jul 2022 21:43:52 -0400 Subject: [PATCH] compilers: include compiler detection output in the debug logs We do something similar when running get_compiler() method checks from the DSL. This ensures that if errors happen, the log file we tell people to check actually works. --- mesonbuild/compilers/detect.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 36c57328b..d7929ad93 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -417,7 +417,12 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin cmd = compiler + [arg] try: + mlog.debug('-----') + mlog.debug(f'Detecting compiler via: {join_args(cmd)}') p, out, err = Popen_safe(cmd) + mlog.debug(f'compiler returned {p}') + mlog.debug(f'compiler stdout:\n{out}') + mlog.debug(f'compiler stderr:\n{err}') except OSError as e: popen_exceptions[join_args(cmd)] = e continue