From 7a28334596f890072774b53953a99a3bc93f3849 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Fri, 28 Mar 2025 16:46:56 -0500 Subject: [PATCH] SCons: Ensure MinGW as fallback if missing MSVC --- platform/windows/detect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 31a8d07fea8..789909b2235 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -148,7 +148,9 @@ def detect_build_env_arch(): def get_tools(env: "SConsEnvironment"): - if os.name != "nt" or env.get("use_mingw"): + from SCons.Tool.MSCommon import msvc_exists + + if os.name != "nt" or env.get("use_mingw") or not msvc_exists(): return ["mingw"] else: msvc_arch_aliases = {"x86_32": "x86", "arm32": "arm"}