Skip to content

Commit e8488c4

Browse files
author
Tony Kuo
committed
use environment flag HNSWLIB_NO_CFLAGS
1 parent 6da99d6 commit e8488c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ class BuildExt(build_ext):
7777
#'unix': ['-O3', '-march=native'], # , '-w'
7878
'unix': ['-O3'], # , '-w'
7979
}
80+
if not os.environ.get("HNSWLIB_NO_CFLAGS"):
81+
if "conda" not in sys.version.lower():
82+
c_opts['unix'].append('-march=native')
83+
8084
link_opts = {
8185
'unix': [],
8286
'msvc': [],

0 commit comments

Comments
 (0)