File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1313# determine CPU support for SSE2 and AVX2
1414cpu_info = cpuinfo .get_cpu_info ()
1515flags = cpu_info .get ('flags' , [])
16- have_sse2 = 'sse2' in flags
17- have_avx2 = 'avx2' in flags
16+ machine = cpuinfo .platform .machine ()
17+
18+ # only check for x86 features on x86_64 arch
19+ have_sse2 = False
20+ have_avx2 = False
21+ if machine == 'x86_64' :
22+ have_sse2 = 'sse2' in flags
23+ have_avx2 = 'avx2' in flags
24+
1825disable_sse2 = 'DISABLE_NUMCODECS_SSE2' in os .environ
1926disable_avx2 = 'DISABLE_NUMCODECS_AVX2' in os .environ
2027
2431if have_cflags :
2532 # respect compiler options set by user
2633 pass
27- elif os .name == 'posix' :
34+ elif os .name == 'posix' and machine == 'x86_64' :
2835 if disable_sse2 :
2936 base_compile_args .append ('-mno-sse2' )
3037 elif have_sse2 :
You can’t perform that action at this time.
0 commit comments