Skip to content

Commit a99495f

Browse files
authored
Merge pull request #3 from housecanary/master
Un-break building under arm64
2 parents 20882ce + b4009eb commit a99495f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from io import open
33

44
from Cython.Build import cythonize
5+
import platform
56
from setuptools import Extension, setup
67

78
EXT_SOURCES = [
@@ -16,7 +17,10 @@
1617
if sys.platform == "win32":
1718
cflags = ["/O2"]
1819
else:
19-
cflags = ["-O3", "-msse4.2"]
20+
if platform.machine().lower() in ("x86_64", "amd64"):
21+
cflags = ["-O3", "-msse4.2"]
22+
else:
23+
cflags = ["-O3", "-march=native"]
2024

2125
extensions = [Extension(
2226
"metrohash",

0 commit comments

Comments
 (0)