mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Increase compiler optimization when using target=release
on iOS/Android
(cherry picked from commit 78b4ec2d4d0d6233ca0f4d8cfeb74640063e970f)
This commit is contained in:
parent
1ed7c12ad4
commit
c0c4418ce7
@ -193,8 +193,11 @@ def configure(env):
|
|||||||
|
|
||||||
if env["target"].startswith("release"):
|
if env["target"].startswith("release"):
|
||||||
if env["optimize"] == "speed": # optimize for speed (default)
|
if env["optimize"] == "speed": # optimize for speed (default)
|
||||||
env.Append(LINKFLAGS=["-O2"])
|
# `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces
|
||||||
env.Append(CCFLAGS=["-O2", "-fomit-frame-pointer"])
|
# 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
|
elif env["optimize"] == "size": # optimize for size
|
||||||
env.Append(CCFLAGS=["-Os"])
|
env.Append(CCFLAGS=["-Os"])
|
||||||
env.Append(LINKFLAGS=["-Os"])
|
env.Append(LINKFLAGS=["-Os"])
|
||||||
|
@ -51,8 +51,11 @@ def configure(env):
|
|||||||
if env["target"].startswith("release"):
|
if env["target"].startswith("release"):
|
||||||
env.Append(CPPDEFINES=["NDEBUG", ("NS_BLOCK_ASSERTIONS", 1)])
|
env.Append(CPPDEFINES=["NDEBUG", ("NS_BLOCK_ASSERTIONS", 1)])
|
||||||
if env["optimize"] == "speed": # optimize for speed (default)
|
if env["optimize"] == "speed": # optimize for speed (default)
|
||||||
env.Append(CCFLAGS=["-O2", "-ftree-vectorize", "-fomit-frame-pointer"])
|
# `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces
|
||||||
env.Append(LINKFLAGS=["-O2"])
|
# when using `target=release_debug`.
|
||||||
|
opt = "-O3" if env["target"] == "release" else "-O2"
|
||||||
|
env.Append(CCFLAGS=[opt, "-ftree-vectorize", "-fomit-frame-pointer"])
|
||||||
|
env.Append(LINKFLAGS=[opt])
|
||||||
elif env["optimize"] == "size": # optimize for size
|
elif env["optimize"] == "size": # optimize for size
|
||||||
env.Append(CCFLAGS=["-Os", "-ftree-vectorize"])
|
env.Append(CCFLAGS=["-Os", "-ftree-vectorize"])
|
||||||
env.Append(LINKFLAGS=["-Os"])
|
env.Append(LINKFLAGS=["-Os"])
|
||||||
|
Loading…
Reference in New Issue
Block a user