diff --git a/pythran/config.py b/pythran/config.py index 4a7d31ae1..c4a3e71e3 100644 --- a/pythran/config.py +++ b/pythran/config.py @@ -190,6 +190,11 @@ def parse_define(define): "extra_objects": [] } + # In case the extension doesn't include any optimization level, make sure we + # have a decent default. Later options have prcedence so this is still + # customizable by users. + extension['extra_compile_args'].insert(0, "-O2") + if python: extension['define_macros'].append('ENABLE_PYTHON_MODULE') extension['define_macros'].append(