Bug 1905842 - add dotprod and SVE CPU config;r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D215667
This commit is contained in:
Nico Grunbaum 2024-07-28 06:49:12 +00:00
parent 292525f116
commit ec8644fd43
2 changed files with 23 additions and 0 deletions

View File

@ -3874,6 +3874,26 @@ set_config(
),
)
set_config(
"SVE2_FLAGS",
["-march=armv9-a+sve2"],
try_compile(
check_msg="for ARM SVE2 target feature",
flags=["-march=armv9-a+sve2"],
when=is_aarch64_target,
),
)
set_config(
"DOTPROD_FLAGS",
["-march=armv8.2-a+dotprod"],
try_compile(
check_msg="for ARM dotprod target feature",
flags=["-march=armv8.2-a+dotprod"],
when=is_aarch64_target,
),
)
# dtrace support
##
option("--enable-dtrace", help="Build with dtrace support")

View File

@ -9,6 +9,9 @@ with Files("**"):
include('/build/gyp.mozbuild')
gyp_vars['moz_have_arm_sve2'] = 1 if CONFIG['SVE2_FLAGS'] else 0
gyp_vars['moz_have_arm_i8mm_and_dot_prod'] = 1 if CONFIG['NEON_I8MM_FLAGS'] and CONFIG['DOTPROD_FLAGS'] else 0
# Set gyp vars that libyuv needs when building under various analysis tools.
gyp_vars_copy = gyp_vars.copy()
if CONFIG['MOZ_VALGRIND']: