Skip to content

Commit

Permalink
Don't set -march=native if -march is set in CFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
NicEggert authored and NicEggert committed Dec 13, 2018
1 parent 3068df8 commit ae406ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python_bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ class BuildExt(build_ext):
"""A custom build extension for adding compiler-specific options."""
c_opts = {
'msvc': ['/EHsc', '/openmp', '/O2'],
'unix': ['-O3', '-march=native'],
'unix': ['-O3'],
}
if 'CFLAGS' not in os.environ or "-march" not in os.environ["CFLAGS"]:
c_opts['unix'].append('-march=native')
link_opts = {
'unix': [],
'msvc': [],
Expand Down

0 comments on commit ae406ac

Please sign in to comment.