Skip to content

Commit 6f2c82d

Browse files
committed
Check before removing march=native
1 parent 359b2ba commit 6f2c82d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class BuildExt(build_ext):
8787
}
8888

8989
if sys.platform == 'darwin':
90-
if platform.machine() == 'arm64':
90+
if platform.machine() == 'arm64' and '-march=native' in c_opts['unix']:
9191
c_opts['unix'].remove('-march=native')
9292
c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
9393
link_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']

0 commit comments

Comments
 (0)