Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/msvc_arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Gigante authored and GitHub committed Dec 23, 2018
2 parents 8be7161 + 21049cc commit 0527d28
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,12 +84,14 @@ 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 'ARCH' in os.environ:
# /arch:[IA32|SSE|SSE2|AVX|AVX2|ARMv7VE|VFPv4]
# See https://docs.microsoft.com/en-us/cpp/build/reference/arch-x86
c_opts['msvc'].append("/arch:{}".format(os.envrion['ARCH']))
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 0527d28

Please sign in to comment.