diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-04 12:41:49 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-05 10:02:16 -0800 |
| commit | 96481b170854b6d65dc140a3308b8faf73f13aa9 (patch) | |
| tree | e7a82da8baf7af62fc800f940ecfdd426ef77532 /mesonbuild | |
| parent | 4f7192ddaf651519725755335ff70cb154124b63 (diff) | |
| download | meson-96481b170854b6d65dc140a3308b8faf73f13aa9.tar.gz | |
interpreter: copy keyword arguments in `build_target`
Because it's not clear how ownership is supposed to work here, and in
the case of `both_libraries()`, if there are any mutations made to them
then those propagate, which isn't what we want.
I'd like to do some further refactoring here that would make this not
necessary.
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index b2c9e810f..89647adee 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -3385,6 +3385,9 @@ class Interpreter(InterpreterBase, HoldableObject): mlog.debug('Unknown target type:', str(targetclass)) raise RuntimeError('Unreachable code') + # Because who owns this isn't clear + kwargs = kwargs.copy() + name, sources = args for_machine = kwargs['native'] if kwargs.get('rust_crate_type') == 'proc-macro': |
