You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Refactor handling of production flag and per-platform LTO defaults
Fixup to #63288. See #65583 for the bug report. Co-authored-by: Cyberrebell <chainsaw75@web.de>
This commit is contained in:
@@ -47,9 +47,6 @@ def get_flags():
|
||||
return [
|
||||
("arch", "arm64"), # Default for convenience.
|
||||
("tools", False),
|
||||
# Benefits of LTO for Android (size, performance) haven't been clearly established yet.
|
||||
# So for now we override the default value which may be set when using `production=yes`.
|
||||
("lto", "none"),
|
||||
]
|
||||
|
||||
|
||||
@@ -136,6 +133,10 @@ def configure(env):
|
||||
env.Append(CPPFLAGS=["-UNDEBUG"])
|
||||
|
||||
# LTO
|
||||
|
||||
if env["lto"] == "auto": # LTO benefits for Android (size, performance) haven't been clearly established yet.
|
||||
env["lto"] = "none"
|
||||
|
||||
if env["lto"] != "none":
|
||||
if env["lto"] == "thin":
|
||||
env.Append(CCFLAGS=["-flto=thin"])
|
||||
|
||||
Reference in New Issue
Block a user