From 79ed1f985c1ba52c0f8f85bd1d201e1ccdb0bdfe Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 17 May 2021 10:47:31 -0700 Subject: [PATCH] compilers/detect: avoid mutating rustc compiler list Because mutation is bad. --- mesonbuild/compilers/detect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 59b425b36..c2c61ef1a 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -970,6 +970,8 @@ def detect_rust_compiler(env: 'Environment', for_machine: MachineChoice) -> Rust 'or use the RUST_LD environment variable, otherwise meson ' 'will override your selection.') + compiler = compiler.copy() # avoid mutating the original list + if override is None: extra_args: T.Dict[str, T.Union[str, bool]] = {} always_args: T.List[str] = []