Ensure KITTY_NO_SIMD is defined for all files on arches without SIMD support

This commit is contained in:
Kovid Goyal 2024-03-15 12:19:47 +05:30
parent aee84c32e5
commit 5e0185d3eb
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -536,6 +536,8 @@ def add_lpath(which: str, name: str, val: Optional[str]) -> None:
set_arches(ldflags, building_arch)
ba = test_compile(cc, *(cppflags + cflags), ldflags=ldflags, get_output_arch=True)
assert isinstance(ba, BinaryArch)
if ba.isa not in (ISA.AMD64, ISA.X86, ISA.ARM64):
cppflags.append('-DKITTY_NO_SIMD')
control_flow_protection = ''
if ba.isa == ISA.AMD64:
@ -707,8 +709,6 @@ def get_source_specific_cflags(env: Env, src: str) -> List[str]:
ans.append('-x86-use-vzeroupper=0')
else:
ans.append('-mno-vzeroupper')
elif env.binary_arch.isa != ISA.ARM64:
ans.append('-DKITTY_NO_SIMD')
elif src.startswith('3rdparty/base64/lib/arch/'):
if env.binary_arch.isa in (ISA.AMD64, ISA.X86):
q = src.split(os.path.sep)