aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mcompile.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/mcompile.py')
-rw-r--r--mesonbuild/mcompile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py
index 536fccb..ccb2f0b 100644
--- a/mesonbuild/mcompile.py
+++ b/mesonbuild/mcompile.py
@@ -224,9 +224,10 @@ def get_parsed_args_vs(options: 'argparse.Namespace', builddir: Path) -> T.Tuple
cmd += options.vs_args
- # Remove platform from env so that msbuild does not pick x86 platform when solution platform is Win32
+ # Remove platform from env if set so that msbuild does not
+ # pick x86 platform when solution platform is Win32
env = os.environ.copy()
- del env['PLATFORM']
+ env.pop('PLATFORM', None)
return cmd, env