aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers/detect.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-07-27 01:56:17 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-07-31 18:58:21 -0400
commit06dfcd7de579832e223e83d16d6a7c8dde24f6d1 (patch)
tree6026a757e4bd660ac0bce9cbf3c32edc202ad842 /mesonbuild/linkers/detect.py
parentb6037c65fce3bdbaeef58657993bc326298d4b9b (diff)
downloadmeson-06dfcd7de579832e223e83d16d6a7c8dde24f6d1.zip
meson-06dfcd7de579832e223e83d16d6a7c8dde24f6d1.tar.gz
meson-06dfcd7de579832e223e83d16d6a7c8dde24f6d1.tar.bz2
linkers: include linker 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.
Diffstat (limited to 'mesonbuild/linkers/detect.py')
-rw-r--r--mesonbuild/linkers/detect.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py
index 6248ac9..72bd0a1 100644
--- a/mesonbuild/linkers/detect.py
+++ b/mesonbuild/linkers/detect.py
@@ -14,6 +14,7 @@
from __future__ import annotations
+from .. import mlog
from ..mesonlib import (
EnvironmentException, OptionKey,
Popen_safe, join_args, search_version
@@ -152,7 +153,13 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty
override = comp_class.use_linker_args(value[0], comp_version)
check_args += override
- _, o, e = Popen_safe(compiler + check_args)
+ mlog.debug('-----')
+ mlog.debug(f'Detecting linker via: {join_args(compiler + check_args)}')
+ p, o, e = Popen_safe(compiler + check_args)
+ mlog.debug(f'linker returned {p}')
+ mlog.debug(f'linker stdout:\n{o}')
+ mlog.debug(f'linker stderr:\n{e}')
+
v = search_version(o + e)
linker: DynamicLinker
if 'LLD' in o.split('\n')[0]: