diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-21 17:26:14 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-07-21 17:26:49 -0300 |
commit | 2b9902db06d922fc98ae49c0d1e31123feed469a (patch) | |
tree | 40cf433aedb97526053dbdeb192250ceedbe903e /platform/x11 | |
parent | cfcb6e11f25adb13177ba08777263288a5ec6f61 (diff) |
-Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/detect.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 09e16ad078..58610a0e55 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -81,14 +81,22 @@ def configure(env): if (env["target"] == "release"): # -O3 -ffast-math is identical to -Ofast. We need to split it out so we can selectively disable # -ffast-math in code for which it generates wrong results. - env.Prepend(CCFLAGS=['-O3', '-ffast-math']) + if (env["optimize"] == "speed"): #optimize for speed (default) + env.Prepend(CCFLAGS=['-O3', '-ffast-math']) + else: #optimize for size + env.Prepend(CCFLAGS=['-Os']) + if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"): env.Prepend(CCFLAGS=['-g2']) elif (env["target"] == "release_debug"): - env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + if (env["optimize"] == "speed"): #optimize for speed (default) + env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + else: #optimize for size + env.Prepend(CCFLAGS=['-Os', '-DDEBUG_ENABLED']) + if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"): |