Skip to content

Commit

Permalink
allow setting windows arch with environment var
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Gigante committed Dec 23, 2018
1 parent 3068df8 commit 8be7161
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python_bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ class BuildExt(build_ext):
'msvc': ['/EHsc', '/openmp', '/O2'],
'unix': ['-O3', '-march=native'],
}
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']))
link_opts = {
'unix': [],
'msvc': [],
Expand Down

0 comments on commit 8be7161

Please sign in to comment.