Module: Mesa Branch: main Commit: 50458703fad756813706f8c4533493e52035ee20 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50458703fad756813706f8c4533493e52035ee20
Author: Chris Spencer <spence...@gmail.com> Date: Thu Sep 7 19:07:56 2023 +0100 meson: Add option to ignore artificial Android limitations Some capabilities are artificially disabled on Android to avoid running afoul of the CTS. Make this behaviour opt-out so devices that don't need strict conformance can take advantage of the full capabilities of the driver. Signed-off-by: Chris Spencer <spence...@gmail.com> Reviewed-by: Chia-I Wu <olva...@gmail.com> Acked-by: Yiwei Zhang <zzyi...@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25101> --- meson.build | 3 +++ meson_options.txt | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/meson.build b/meson.build index e7edba1a2d3..af5ab824360 100644 --- a/meson.build +++ b/meson.build @@ -891,6 +891,9 @@ if with_platform_android '-DANDROID', '-DANDROID_API_LEVEL=' + get_option('platform-sdk-version').to_string() ] + if get_option('android-strict') + pre_args += '-DANDROID_STRICT' + endif endif # On Android, seccomp kills the process on kernels without diff --git a/meson_options.txt b/meson_options.txt index c76fa6d3382..92ffd1d6c40 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -30,6 +30,15 @@ option( description : 'Build against android-stub', ) +option( + 'android-strict', + type : 'boolean', + value : true, + description : 'Enable strict Android compliance. Disabling may cause CTS ' + + 'failures or other problems, but allows drivers to expose ' + + 'capabilities that are normally hidden. Default: true' +) + option( 'android-libbacktrace', type : 'feature',