You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +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>
(cherry picked from commit 35a15e6191)
This commit is contained in:
@@ -48,9 +48,6 @@ def get_ndk_version():
|
||||
def get_flags():
|
||||
return [
|
||||
("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"),
|
||||
]
|
||||
|
||||
|
||||
@@ -141,6 +138,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