1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

-Fix disable_3d flag

-Add extra flag optimize=[size,speed] to be able to prioritize size
This commit is contained in:
Juan Linietsky
2018-07-21 17:26:14 -03:00
parent cfcb6e11f2
commit 2b9902db06
12 changed files with 97 additions and 33 deletions

View File

@@ -139,8 +139,13 @@ def configure(env):
## Build type
if (env["target"].startswith("release")):
env.Append(LINKFLAGS=['-O2'])
env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
if (env["optimize"] == "speed"): #optimize for speed (default)
env.Append(LINKFLAGS=['-O2'])
env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
else: #optimize for size
env.Append(CPPFLAGS=['-Os', '-DNDEBUG'])
env.Append(LINKFLAGS=['-Os'])
if (can_vectorize):
env.Append(CPPFLAGS=['-ftree-vectorize'])
if (env["target"] == "release_debug"):