Skip to content

Commit a1ae584

Browse files
Repiteodsnopek
authored andcommitted
fix is_msvc and use_hot_reload variables
(cherry picked from commit 648b8c4)
1 parent 805cdde commit a1ae584

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tools/godotcpp.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,15 @@ def generate(env):
239239

240240
print("Building for architecture " + env["arch"] + " on platform " + env["platform"])
241241

242+
tool = Tool(env["platform"], toolpath=["tools"])
243+
244+
if tool is None or not tool.exists(env):
245+
raise ValueError("Required toolchain not found for platform " + env["platform"])
246+
247+
tool.generate(env)
248+
target_tool = Tool("targets", toolpath=["tools"])
249+
target_tool.generate(env)
250+
242251
# Disable exception handling. Godot doesn't use exceptions anywhere, and this
243252
# saves around 20% of binary size and very significant build time.
244253
if env["disable_exceptions"]:
@@ -249,15 +258,6 @@ def generate(env):
249258
elif env.get("is_msvc", False):
250259
env.Append(CXXFLAGS=["/EHsc"])
251260

252-
tool = Tool(env["platform"], toolpath=["tools"])
253-
254-
if tool is None or not tool.exists(env):
255-
raise ValueError("Required toolchain not found for platform " + env["platform"])
256-
257-
tool.generate(env)
258-
target_tool = Tool("targets", toolpath=["tools"])
259-
target_tool.generate(env)
260-
261261
# Require C++17
262262
if env.get("is_msvc", False):
263263
env.Append(CXXFLAGS=["/std:c++17"])

0 commit comments

Comments
 (0)