meson: turn android-libbacktrace into a feature option

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20915>
This commit is contained in:
Eric Engestrom 2023-01-25 18:44:33 +00:00 committed by Marge Bot
parent 10992256dd
commit 6291d4d339
3 changed files with 6 additions and 12 deletions

View File

@ -345,7 +345,7 @@ debian-android:
-D llvm=disabled
-D platform-sdk-version=33
-D valgrind=disabled
-D android-libbacktrace=false
-D android-libbacktrace=disabled
GALLIUM_ST: >
-D dri3=disabled
-D gallium-vdpau=disabled

View File

@ -818,14 +818,10 @@ if with_android_stub and not with_platform_android
error('`-D android-stub=true` makes no sense without `-D platforms=android`')
endif
if get_option('android-libbacktrace') == 'auto'
with_libbacktrace = with_platform_android
else
with_libbacktrace = get_option('android-libbacktrace') == 'true'
if with_libbacktrace and not with_platform_android
error('`-D android-libbacktrace=true` makes no sense without `-D platforms=android`')
endif
endif
with_libbacktrace = get_option('android-libbacktrace') \
.require(with_platform_android, error_message : '`-D android-libbacktrace=enabled` makes no sense without `-D platforms=android`') \
.disable_auto_if(not with_platform_android) \
.allowed()
if with_libbacktrace
cpp_args += '-DWITH_LIBBACKTRACE'

View File

@ -45,9 +45,7 @@ option(
)
option(
'android-libbacktrace',
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false'],
type : 'feature',
description : 'Use Android\'s libbacktrace',
)
option(