diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py index 80eaad66..8a6e2c28 100644 --- a/waflib/Tools/c_config.py +++ b/waflib/Tools/c_config.py @@ -195,7 +195,7 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=No static = False elif x.startswith('-Wl'): app('LINKFLAGS', x) - elif x.startswith(('-m', '-f', '-dynamic')): + elif x.startswith(('-m', '-f', '-dynamic', '-O')): app('CFLAGS', x) app('CXXFLAGS', x) elif x.startswith('-bundle'): @@ -210,9 +210,6 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=No app('LINKFLAGS', tmp) elif x.endswith(('.a', '.so', '.dylib', '.lib')): appu('LINKFLAGS', x) # not cool, #762 - elif x.startswith('-O'): - app('CFLAGS', x) - app('CXXFLAGS', x) @conf def validate_cfg(self, kw):