aboutsummaryrefslogtreecommitdiffhomepage
path: root/waftools/detections
diff options
context:
space:
mode:
authorGravatar Tsukasa OMOTO <henry0312@gmail.com>2014-07-20 01:45:43 +0900
committerGravatar wm4 <wm4@nowhere>2014-07-20 00:08:36 +0200
commitb0ff0527a37d988bfbc12d441c60523a50647f84 (patch)
tree2b83aa8f7bcd51e60ad908da4a273045cefd4907 /waftools/detections
parent887140b7d4c79f3afd3edc26591f9938a0acae38 (diff)
build: enable compiler optimization by default
Diffstat (limited to 'waftools/detections')
-rw-r--r--waftools/detections/compiler.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py
index 2d6f8c6d23..b98218856f 100644
--- a/waftools/detections/compiler.py
+++ b/waftools/detections/compiler.py
@@ -22,6 +22,9 @@ def __add_generic_flags__(ctx):
"-D_LARGEFILE64_SOURCE",
"-std=c99", "-Wall"]
+ if ctx.is_optimization():
+ ctx.env.CFLAGS += ['-O2']
+
if ctx.is_debug_build():
ctx.env.CFLAGS += ['-g']