Skip to content

Commit

Permalink
build: set arm_fpu to 'neon' on ARMv8
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Nov 10, 2022
1 parent da44fd8 commit 885697b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,10 @@ def cc_macros(cc=None):
k[key] = val
return k

def is_arch_armv8():
"""Check for ARMv8 instructions"""
cc_macros_cache = cc_macros()
return cc_macros_cache.get('__ARM_ARCH') == '8'

def is_arch_armv7():
"""Check for ARMv7 instructions"""
Expand Down Expand Up @@ -1148,7 +1152,10 @@ def configure_arm(o):

arm_fpu = 'vfp'

if is_arch_armv7():
if is_arch_armv8():
arm_fpu = 'neon'
o['variables']['arm_version'] = '8'
elif is_arch_armv7():
arm_fpu = 'vfpv3'
o['variables']['arm_version'] = '7'
else:
Expand Down

0 comments on commit 885697b

Please sign in to comment.