Skip to content

Commit 92ec23b

Browse files
committed
Only set VEC1SIMD etc on x86
1 parent cb593cc commit 92ec23b

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

tools/vend.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,8 @@ def do_build(what: set[str], verbose: bool, fail_fast: bool = False):
712712
# we have to compile the file twice with different defines and compiler flags
713713
# first scalar and then avx2
714714
macros1 = extra.defines or []
715-
macros1.append(("VEC1SIMD", "SCALAR"))
715+
if is_x86:
716+
macros1.append(("VEC1SIMD", "SCALAR"))
716717

717718
macros2 = extra.defines or []
718719
macros2.append(("VEC1SIMD", "AVX2"))
@@ -733,15 +734,16 @@ def do_build(what: set[str], verbose: bool, fail_fast: bool = False):
733734
macros=macros1,
734735
)
735736

736-
objs.extend(
737-
compiler.compile(
738-
[avx_c],
739-
output_dir=str(build_dir),
740-
include_dirs=include_dirs,
741-
extra_preargs=preargs_2,
742-
macros=macros2,
737+
if is_x86:
738+
objs.extend(
739+
compiler.compile(
740+
[avx_c],
741+
output_dir=str(build_dir),
742+
include_dirs=include_dirs,
743+
extra_preargs=preargs_2,
744+
macros=macros2,
745+
)
743746
)
744-
)
745747

746748
else:
747749
objs = compiler.compile(

0 commit comments

Comments
 (0)