meson: allow feature options to take true/false to mean enabled/disabled

This reduces the pain of Meson having picked inconsistent value names.

See also https://github.com/mesonbuild/meson/pull/11279 where Meson devs
argue that allowing `foo=false` could be interpreted by users to mean
either `disabled` or `auto`, which I personally don't see.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21485>
This commit is contained in:
Eric Engestrom
2023-02-23 10:48:58 +00:00
committed by Marge Bot
parent 049086cd58
commit a18f439f52

View File

@@ -39,6 +39,7 @@ option(
option( option(
'dri3', 'dri3',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'enable support for dri3' description : 'enable support for dri3'
) )
@@ -81,6 +82,7 @@ option(
option( option(
'gallium-vdpau', 'gallium-vdpau',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'enable gallium vdpau frontend.', description : 'enable gallium vdpau frontend.',
) )
@@ -110,6 +112,7 @@ option(
option( option(
'gallium-va', 'gallium-va',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'enable gallium va frontend.', description : 'enable gallium va frontend.',
) )
@@ -123,6 +126,7 @@ option(
option( option(
'gallium-xa', 'gallium-xa',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'enable gallium xa frontend.', description : 'enable gallium xa frontend.',
) )
@@ -221,6 +225,7 @@ option(
option( option(
'shader-cache', 'shader-cache',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build with on-disk shader cache support.', description : 'Build with on-disk shader cache support.',
) )
@@ -273,6 +278,7 @@ option(
option( option(
'shared-glapi', 'shared-glapi',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Whether to build a shared or static glapi. Defaults to ' + description : 'Whether to build a shared or static glapi. Defaults to ' +
'false on Windows, true elsewhere' 'false on Windows, true elsewhere'
) )
@@ -280,12 +286,14 @@ option(
option( option(
'gles1', 'gles1',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build support for OpenGL ES 1.x' description : 'Build support for OpenGL ES 1.x'
) )
option( option(
'gles2', 'gles2',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build support for OpenGL ES 2.x and 3.x' description : 'Build support for OpenGL ES 2.x and 3.x'
) )
@@ -299,6 +307,7 @@ option(
option( option(
'gbm', 'gbm',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build support for gbm platform' description : 'Build support for gbm platform'
) )
@@ -321,6 +330,7 @@ option(
option( option(
'egl', 'egl',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build support for EGL platform' description : 'Build support for EGL platform'
) )
@@ -335,6 +345,7 @@ option(
'microsoft-clc', 'microsoft-clc',
type : 'feature', type : 'feature',
value : 'auto', value : 'auto',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build support for the Microsoft CLC to DXIL compiler' description : 'Build support for the Microsoft CLC to DXIL compiler'
) )
@@ -362,12 +373,14 @@ option(
option( option(
'llvm', 'llvm',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build with LLVM support.' description : 'Build with LLVM support.'
) )
option( option(
'shared-llvm', 'shared-llvm',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Whether to link LLVM shared or statically.' description : 'Whether to link LLVM shared or statically.'
) )
@@ -382,18 +395,21 @@ option(
option( option(
'valgrind', 'valgrind',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build with valgrind support' description : 'Build with valgrind support'
) )
option( option(
'libunwind', 'libunwind',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Use libunwind for stack-traces' description : 'Use libunwind for stack-traces'
) )
option( option(
'lmsensors', 'lmsensors',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Enable HUD lmsensors support.' description : 'Enable HUD lmsensors support.'
) )
@@ -469,12 +485,14 @@ option(
option( option(
'power8', 'power8',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Enable power8 optimizations.', description : 'Enable power8 optimizations.',
) )
option( option(
'xlib-lease', 'xlib-lease',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Enable VK_EXT_acquire_xlib_display.' description : 'Enable VK_EXT_acquire_xlib_display.'
) )
@@ -510,6 +528,7 @@ option(
option( option(
'allow-kcmp', 'allow-kcmp',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Allow using KCMP_FILE to compare file descriptions. ' + description : 'Allow using KCMP_FILE to compare file descriptions. ' +
'auto = allowed everywhere except on Android' 'auto = allowed everywhere except on Android'
) )
@@ -517,12 +536,14 @@ option(
option( option(
'zstd', 'zstd',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Use ZSTD instead of ZLIB in some cases.' description : 'Use ZSTD instead of ZLIB in some cases.'
) )
option( option(
'zlib', 'zlib',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
value : 'enabled', value : 'enabled',
description : 'Use ZLIB to build driver. Default: enabled' description : 'Use ZLIB to build driver. Default: enabled'
) )
@@ -579,6 +600,7 @@ option(
option( option(
'intel-clc', 'intel-clc',
type : 'feature', type : 'feature',
deprecated: {'true': 'enabled', 'false': 'disabled'},
value : 'disabled', value : 'disabled',
description : 'Build the intel-clc compiler (enables Vulkan Intel ' + description : 'Build the intel-clc compiler (enables Vulkan Intel ' +
'Ray Tracing on supported hardware).' 'Ray Tracing on supported hardware).'
@@ -602,6 +624,7 @@ option(
'gallium-d3d12-video', 'gallium-d3d12-video',
type : 'feature', type : 'feature',
value : 'auto', value : 'auto',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'build gallium d3d12 with video support.', description : 'build gallium d3d12 with video support.',
) )
@@ -626,6 +649,7 @@ option(
'xmlconfig', 'xmlconfig',
type : 'feature', type : 'feature',
value : 'auto', value : 'auto',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description : 'Build custom xmlconfig (driconf) support. If disabled, ' + description : 'Build custom xmlconfig (driconf) support. If disabled, ' +
'the default driconf file is hardcoded into Mesa. ' + 'the default driconf file is hardcoded into Mesa. ' +
'Requires expat.' 'Requires expat.'