diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-05-17 10:47:31 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-09-24 18:48:48 -0700 |
commit | 79ed1f985c1ba52c0f8f85bd1d201e1ccdb0bdfe (patch) | |
tree | 2d6ea3240960b1a9b0fb80ce4010e7652b3a29d5 /mesonbuild/compilers/detect.py | |
parent | bca6c670c3489ee220f1530d31aa852188d5181c (diff) | |
download | meson-79ed1f985c1ba52c0f8f85bd1d201e1ccdb0bdfe.zip meson-79ed1f985c1ba52c0f8f85bd1d201e1ccdb0bdfe.tar.gz meson-79ed1f985c1ba52c0f8f85bd1d201e1ccdb0bdfe.tar.bz2 |
compilers/detect: avoid mutating rustc compiler list
Because mutation is bad.
Diffstat (limited to 'mesonbuild/compilers/detect.py')
-rw-r--r-- | mesonbuild/compilers/detect.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 59b425b..c2c61ef 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] = [] |