From eb6f6c1976133f5a7fb65c445784550967836229 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 4 Aug 2025 17:31:00 +0000 Subject: [PATCH] meson: Allow controlling perfetto fallback Part-of: --- meson.build | 6 +++++- meson.options | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index aa485a262f5..4351e1c711e 100644 --- a/meson.build +++ b/meson.build @@ -2164,11 +2164,15 @@ else pre_args += '-DCUSTOM_SHADER_REPLACEMENT' endif +allow_fallback_for_perfetto = get_option('allow-fallback-for').contains('perfetto') with_perfetto = get_option('perfetto') with_datasources = get_option('datasources') with_any_datasource = with_datasources.length() != 0 if with_perfetto - dep_perfetto = dependency('perfetto', fallback: ['perfetto', 'dep_perfetto']) + dep_perfetto = dependency( + 'perfetto', + fallback: allow_fallback_for_perfetto ? ['perfetto', 'dep_perfetto'] : [], + ) pre_args += '-DHAVE_PERFETTO' endif diff --git a/meson.options b/meson.options index c28321c25aa..1e394aade9a 100644 --- a/meson.options +++ b/meson.options @@ -832,9 +832,9 @@ option( option( 'allow-fallback-for', type : 'array', - value : [], + value : ['perfetto'], choices : [ - 'libdrm', + 'libdrm', 'perfetto', ], description : 'Allows the fallback mechanism if the dependency is not available on the system, or too old.' )