aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers/cpp.py2
-rw-r--r--mesonbuild/interpreter/interpreter.py10
2 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 496d6c1..7296626 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -58,7 +58,7 @@ def non_msvc_eh_options(eh: str, args: T.List[str]) -> None:
if eh == 'none':
args.append('-fno-exceptions')
elif eh in {'s', 'c'}:
- mlog.warning('non-MSVC compilers do not support ' + eh + ' exception handling.' +
+ mlog.warning(f'non-MSVC compilers do not support {eh} exception handling. '
'You may want to set eh to \'default\'.')
class CPPCompiler(CLikeCompiler, Compiler):
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 5347120..92d58aa 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2905,10 +2905,12 @@ class Interpreter(InterpreterBase, HoldableObject):
return
if (self.coredata.options[OptionKey('b_lundef')].value and
self.coredata.options[OptionKey('b_sanitize')].value != 'none'):
- mlog.warning('''Trying to use {} sanitizer on Clang with b_lundef.
-This will probably not work.
-Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey('b_sanitize')].value),
- location=self.current_node)
+ value = self.coredata.options[OptionKey('b_sanitize')].value
+ mlog.warning(textwrap.dedent(f'''\
+ Trying to use {value} sanitizer on Clang with b_lundef.
+ This will probably not work.
+ Try setting b_lundef to false instead.'''),
+ location=self.current_node) # noqa: E128
# Check that the indicated file is within the same subproject
# as we currently are. This is to stop people doing