From 0f84d8dc497e73a8ad21ae51bc4912082f2d2454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 16 Dec 2020 16:29:32 +0100 Subject: SCons: Add only selected platform's opts to env Otherwise we can get situations where platform-specific opts with the same name can override each other depending on the order at which platforms are parsed, as was the case with `use_static_cpp` in Linux/Windows. Fixes #44304. This also has the added benefit that the `scons --help` output will now only include the options which are relevant for the selected (or detected) platform. --- platform/windows/detect.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'platform/windows/detect.py') diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 859051ede9..5216fca2ca 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -68,7 +68,7 @@ def get_opts(): EnumVariable("windows_subsystem", "Windows subsystem", "default", ("default", "console", "gui")), BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False), ("msvc_version", "MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.", None), - BoolVariable("use_mingw", "Use the Mingw compiler, even if MSVC is installed. Only used on Windows.", False), + BoolVariable("use_mingw", "Use the Mingw compiler, even if MSVC is installed.", False), BoolVariable("use_llvm", "Use the LLVM compiler", False), BoolVariable("use_thinlto", "Use ThinLTO", False), BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True), @@ -76,12 +76,10 @@ def get_opts(): def get_flags(): - return [] def build_res_file(target, source, env): - if env["bits"] == "32": cmdbase = env["mingw_prefix_32"] else: -- cgit v1.2.3