Skip to content

Commit

Permalink
Make sure we have a decent optimization level for the C++ compilation…
Browse files Browse the repository at this point in the history
… step

This used to be enforced by distutils but it seems to no longer be the
case.

Fix #2219
  • Loading branch information
serge-sans-paille committed Jul 14, 2024
1 parent faa2e66 commit d4fcaeb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pythran/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d4fcaeb

Please sign in to comment.