Add lto scons option, defaulting to "none".

This commit is contained in:
Lukas Tenbrink
2024-09-21 12:52:50 +02:00
committed by David Snopek
parent 549f5d6550
commit 17818534d9
8 changed files with 69 additions and 0 deletions

View File

@@ -73,4 +73,9 @@ def generate(env):
env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED"])
# Refer to https://github.com/godotengine/godot/blob/master/platform/macos/detect.py
# LTO benefits for macOS (size, performance) haven't been clearly established yet.
if env["lto"] == "auto":
env["lto"] = "none"
common_compiler_flags.generate(env)