You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Increase compiler optimization when using target=release on iOS/Android
(cherry picked from commit 78b4ec2d4d)
This commit is contained in:
committed by
Rémi Verschelde
parent
559c20aa2f
commit
0df7aa1e2c
@@ -193,8 +193,11 @@ def configure(env):
|
||||
|
||||
if env["target"].startswith("release"):
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Append(LINKFLAGS=["-O2"])
|
||||
env.Append(CCFLAGS=["-O2", "-fomit-frame-pointer"])
|
||||
# `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces
|
||||
# when using `target=release_debug`.
|
||||
opt = "-O3" if env["target"] == "release" else "-O2"
|
||||
env.Append(LINKFLAGS=[opt])
|
||||
env.Append(CCFLAGS=[opt, "-fomit-frame-pointer"])
|
||||
elif env["optimize"] == "size": # optimize for size
|
||||
env.Append(CCFLAGS=["-Os"])
|
||||
env.Append(LINKFLAGS=["-Os"])
|
||||
|
||||
Reference in New Issue
Block a user