meson: use a feature option for power8

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
This commit is contained in:
Dylan Baker 2022-12-20 16:06:10 -08:00 committed by Marge Bot
parent 2653fe11c9
commit ce490a20e7
2 changed files with 3 additions and 12 deletions

View File

@ -766,14 +766,7 @@ if with_gallium_st_d3d10umd
endif
endif
_power8 = get_option('power8')
if _power8 == 'true'
_power8 = 'enabled'
warning('power8 option "true" deprecated, please use "enabled" instead.')
elif _power8 == 'false'
_power8 = 'disabled'
warning('power8 option "false" deprecated, please use "disabled" instead.')
endif
if _power8 != 'disabled'
if _power8.allowed()
if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8')
error('Altivec is not supported with gcc version < 4.8.')
@ -789,7 +782,7 @@ if _power8 != 'disabled'
args : '-mpower8-vector',
name : 'POWER8 intrinsics')
pre_args += ['-D_ARCH_PWR8', '-mpower8-vector']
elif get_option('power8') == 'enabled'
elif _power8.enabled()
error('POWER8 intrinsic support required but not found.')
endif
endif

View File

@ -407,9 +407,7 @@ option(
)
option(
'power8',
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
type : 'feature',
description : 'Enable power8 optimizations.',
)
option(