mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-08 21:25:32 +02:00
Use -mtune=intel for SIMD files when building without native optimizations
This commit is contained in:
6
setup.py
6
setup.py
@@ -708,15 +708,19 @@ def get_source_specific_defines(env: Env, src: str) -> Tuple[str, List[str], Opt
|
||||
|
||||
def get_source_specific_cflags(env: Env, src: str) -> List[str]:
|
||||
ans = list(env.cflags)
|
||||
# SIMD specific flags, ignored for native optimizations as they give slightly better performance
|
||||
# SIMD specific flags
|
||||
if src in ('kitty/simd-string-128.c', 'kitty/simd-string-256.c'):
|
||||
if env.binary_arch.isa in (ISA.AMD64, ISA.X86):
|
||||
ans.append('-msse4.2' if '128' in src else '-mavx2')
|
||||
if not env.native_optimizations:
|
||||
ans.append('-mtune=intel')
|
||||
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)
|
||||
if not env.native_optimizations:
|
||||
ans.append('-mtune=intel')
|
||||
if 'sse3' in q:
|
||||
ans.append('-msse3')
|
||||
elif 'sse41' in q:
|
||||
|
||||
Reference in New Issue
Block a user