From a1ae58448c75cd7402a48a045be4034fd1846ad9 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Mon, 6 Nov 2023 10:43:24 -0600 Subject: [PATCH] fix is_msvc and use_hot_reload variables (cherry picked from commit 648b8c4489bdf0fe1d2beff737a147c5c38d66d7) --- tools/godotcpp.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/godotcpp.py b/tools/godotcpp.py index 925b214d..efe632ab 100644 --- a/tools/godotcpp.py +++ b/tools/godotcpp.py @@ -239,6 +239,15 @@ def generate(env): print("Building for architecture " + env["arch"] + " on platform " + env["platform"]) + tool = Tool(env["platform"], toolpath=["tools"]) + + if tool is None or not tool.exists(env): + raise ValueError("Required toolchain not found for platform " + env["platform"]) + + tool.generate(env) + target_tool = Tool("targets", toolpath=["tools"]) + target_tool.generate(env) + # Disable exception handling. Godot doesn't use exceptions anywhere, and this # saves around 20% of binary size and very significant build time. if env["disable_exceptions"]: @@ -249,15 +258,6 @@ def generate(env): elif env.get("is_msvc", False): env.Append(CXXFLAGS=["/EHsc"]) - tool = Tool(env["platform"], toolpath=["tools"]) - - if tool is None or not tool.exists(env): - raise ValueError("Required toolchain not found for platform " + env["platform"]) - - tool.generate(env) - target_tool = Tool("targets", toolpath=["tools"]) - target_tool.generate(env) - # Require C++17 if env.get("is_msvc", False): env.Append(CXXFLAGS=["/std:c++17"])