summaryrefslogtreecommitdiffstats
path: root/tools/windows.py
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-13 03:25:37 +0000
committerGitHub <noreply@github.com>2024-11-13 03:25:37 +0000
commita089d372e877febb71e4b5365e567275c301e750 (patch)
tree98d7630d8587d265c655a53490c58a7831c3fff8 /tools/windows.py
parent8ca6bc2cfb90178d10c2a4a7c502242213bfa645 (diff)
parent2a18d3da32c47f8ac1eea7c05fe3bc9ba2affc82 (diff)
downloadredot-cpp-master.tar.gz
Merge pull request #7 from Spartan322/merge/c20a84eHEADmaster
Merge commit godotengine/godot-cpp@c20a84e
Diffstat (limited to 'tools/windows.py')
-rw-r--r--tools/windows.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/windows.py b/tools/windows.py
index 2e8d609..490b9f7 100644
--- a/tools/windows.py
+++ b/tools/windows.py
@@ -198,4 +198,12 @@ def generate(env):
env.Append(CPPDEFINES=["WINDOWS_ENABLED"])
+ # Refer to https://github.com/godotengine/godot/blob/master/platform/windows/detect.py
+ if env["lto"] == "auto":
+ if env.get("is_msvc", False):
+ # No LTO by default for MSVC, doesn't help.
+ env["lto"] = "none"
+ else: # Release
+ env["lto"] = "full"
+
common_compiler_flags.generate(env)