Commit 83b9d14
build: stop leaking AVX/AVX2 codegen into scalar/SSE2 TUs
batch_validation.cpp and plot_generation.cpp contain no SIMD intrinsics —
they only call into shabal256_avx2/sse2 via ordinary function calls. The
set_property(SOURCE ... COMPILE_OPTIONS ${AVX2_CXXFLAGS}) blocks therefore
served no purpose and let the compiler emit AVX/AVX2 anywhere in those
TUs (memset/memcpy expansion to YMM, VEX-encoded SSE, auto-vectorization).
The result was SIGILL on non-AVX2 x86-64 CPUs before the runtime
HaveAVX2() gate could fire.
Drop the three set_property blocks; keep target_compile_definitions
ENABLE_AVX2, which is just a #define and has no codegen impact. The
intrinsics-bearing TUs (shabal256_avx2.cpp, sha256_avx2.cpp) keep their
flags via src/crypto/CMakeLists.txt and are unaffected.
Fixes PoC-Consortium/bitcoin-pocx#1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e06a6fc commit 83b9d14
2 files changed
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 119 | | |
126 | 120 | | |
127 | 121 | | |
| |||
0 commit comments