summaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-02-03 09:51:36 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-10-02 08:48:06 -0700
commitbeef43283c03f64111117a9b973c517dbf093847 (patch)
treeb23a58b299f8183b7bddedcfca8d1742c3f3798f /mesonbuild
parent12bebed5a13f9597476fc05d82d5c9586875ee1d (diff)
downloadmeson-beef43283c03f64111117a9b973c517dbf093847.tar.gz
interpreter: catch '@DEPFILE@' in run_target and raise an exception
If this gets to the backend it will cause an uncaught exception, so let's catch it here and just give a real error.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 2cf5b7a5b..a682bc822 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2172,6 +2172,10 @@ class Interpreter(InterpreterBase, HoldableObject):
raise InterpreterException(f'Tried to use non-existing executable {i.name!r}')
if isinstance(all_args[0], str):
all_args[0] = self.find_program_impl([all_args[0]])
+
+ if '@DEPFILE@' in all_args:
+ raise InterpreterException('run_target does not have support for @DEPFILE@')
+
name = args[0]
tg = build.RunTarget(name, all_args, kwargs['depends'], self.subdir, self.subproject, self.environment,
kwargs['env'])