2024-07-04 13:45:43 +00:00
|
|
|
diff --git a/setup.py b/setup.py
|
2024-07-27 09:43:29 +00:00
|
|
|
index c6fc019..49fb3c8 100644
|
2024-07-04 13:45:43 +00:00
|
|
|
--- a/setup.py
|
|
|
|
+++ b/setup.py
|
2024-07-27 09:43:29 +00:00
|
|
|
@@ -14,11 +14,12 @@ machine_arch = os.popen("uname -m").readlines()[0].rsplit()[0]
|
2024-07-04 13:45:43 +00:00
|
|
|
|
2024-07-27 09:43:29 +00:00
|
|
|
if machine_system == "Darwin":
|
2024-07-04 13:45:43 +00:00
|
|
|
# note: see https://github.com/pypa/wheel/issues/406
|
|
|
|
- simd_flag = ['-march=native', '-D__AVX2__', '-mmacosx-version-min=10.9']
|
2024-07-27 09:43:29 +00:00
|
|
|
if machine_arch in ["aarch64", "arm64"]:
|
2024-07-04 13:45:43 +00:00
|
|
|
+ simd_flag = ['-march=armv8-a+simd', '-D__AVX2__', '-mmacosx-version-min=10.9']
|
|
|
|
os.environ['_PYTHON_HOST_PLATFORM'] = "macosx-10.9-arm64"
|
|
|
|
os.environ['ARCHFLAGS'] = "-arch arm64"
|
2024-07-27 09:43:29 +00:00
|
|
|
else: # x86_64
|
2024-07-04 13:45:43 +00:00
|
|
|
+ simd_flag = ['-msse2', '-mmacosx-version-min=10.9']
|
|
|
|
os.environ['_PYTHON_HOST_PLATFORM'] = "macosx-10.9-x86_64"
|
|
|
|
os.environ['ARCHFLAGS'] = "-arch x86_64"
|
|
|
|
else:
|
2024-07-27 09:43:29 +00:00
|
|
|
@@ -27,7 +28,7 @@ else:
|
|
|
|
elif machine_arch in ["aarch32"]:
|
2024-07-04 13:45:43 +00:00
|
|
|
simd_flag = ['-march=armv8-a+simd', '-mfpu=auto -D__AVX2__']
|
2024-07-27 09:43:29 +00:00
|
|
|
else: # x86_64
|
2024-07-04 13:45:43 +00:00
|
|
|
- simd_flag=['-march=native']
|
|
|
|
+ simd_flag=[]
|
|
|
|
if os.getenv('SSE4', False):
|
|
|
|
simd_flag=['-msse4.1']
|
|
|
|
elif os.getenv('SSE2', False):
|