Skip to content

Commit

Permalink
Merge pull request #361 from neggert/march_override
Browse files Browse the repository at this point in the history
Don't set -march=native if -march is set in CFLAGS
  • Loading branch information
Leonid Boytsov authored and GitHub committed Dec 21, 2018
2 parents 3068df8 + ae406ac commit 21049cc
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 21049cc

Please sign in to comment.