Commit a55b375
Fix setup.py cross-compilation flags for cibuildwheel
- macOS: detect x86_64 cross-compile via CIBW_ARCHS_MACOS, use
-msse4.2 -mpopcnt instead of -mcpu=apple-m1 for x86_64 targets
- Linux x86_64: use -msse4.2 -mpopcnt instead of -march=native
for manylinux portability
- Linux aarch64: use -march=armv8-a+simd
Previously, machine() returned 'arm64' on M1 runners even when
building x86_64 wheels, causing -mcpu=apple-m1 to be passed
incorrectly. And -march=native in manylinux containers didn't
include popcnt, breaking _mm_popcnt_u64 compilation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e9903c8 commit a55b375
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
0 commit comments