summaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py12
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"):