aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-07-27 00:38:54 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-07-31 18:58:21 -0400
commitb6037c65fce3bdbaeef58657993bc326298d4b9b (patch)
tree06489b9afc5ccf3adc57002af8cad6cd8b320589
parent8a8ab9a8e0c2cefb6faa0734e52803c74790576c (diff)
downloadmeson-b6037c65fce3bdbaeef58657993bc326298d4b9b.zip
meson-b6037c65fce3bdbaeef58657993bc326298d4b9b.tar.gz
meson-b6037c65fce3bdbaeef58657993bc326298d4b9b.tar.bz2
linkers: better reporting of command failures
Use join_args to ensure that commands are rendered correctly and with less code.
-rw-r--r--mesonbuild/linkers/detect.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py
index 31f6ddc..6248ac9 100644
--- a/mesonbuild/linkers/detect.py
+++ b/mesonbuild/linkers/detect.py
@@ -16,7 +16,7 @@ from __future__ import annotations
from ..mesonlib import (
EnvironmentException, OptionKey,
- Popen_safe, search_version
+ Popen_safe, join_args, search_version
)
from .linkers import (
AppleDynamicLinker,
@@ -51,8 +51,8 @@ defaults['gcc_static_linker'] = ['gcc-ar']
defaults['clang_static_linker'] = ['llvm-ar']
def __failed_to_detect_linker(compiler: T.List[str], args: T.List[str], stdout: str, stderr: str) -> 'T.NoReturn':
- msg = 'Unable to detect linker for compiler "{} {}"\nstdout: {}\nstderr: {}'.format(
- ' '.join(compiler), ' '.join(args), stdout, stderr)
+ msg = 'Unable to detect linker for compiler `{}`\nstdout: {}\nstderr: {}'.format(
+ join_args(compiler + args), stdout, stderr)
raise EnvironmentException(msg)