From 30ecaf6689fd4a0544e39b14b2bac926f64aedd4 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Fri, 16 Aug 2024 09:31:50 -0700 Subject: [PATCH] meson: Only use fallback for Lua if building freedreno tools This keeps the allow_fallback behavior for Lua dependency when freedreno tools are used, like it used to be. But will disable the fallback mechanism otherwise. For Intel, the dependency is optional and the tool that uses is skipped when Lua is not available, so it is fine we don't use fallback there. Reviewed-by: Dylan Baker Part-of: --- meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 3d72bb56f25..9e740779165 100644 --- a/meson.build +++ b/meson.build @@ -632,7 +632,7 @@ prog_glslang = find_program('glslangValidator', native : true, if prog_glslang.found() # Check if glslang has depfile support. Support was added in 11.3.0, but # Windows path support was broken until 11.9.0. - # + # # It is intentional to check the build machine, since we need to ensure that # glslang will output valid paths on the build platform _glslang_check = build_machine.system() == 'windows' ? '>= 11.9.0' : '>= 11.3.0' @@ -1957,7 +1957,8 @@ endif dep_lua = dependency('lua54', 'lua5.4', 'lua-5.4', 'lua53', 'lua5.3', 'lua-5.3', 'lua', required: false, - allow_fallback: true, version: '>=5.3') + allow_fallback: with_tools.contains('freedreno'), + version: '>=5.3') # Be explicit about only using this lib on Windows, to avoid picking # up random libs with the generic name 'libversion' @@ -1994,7 +1995,7 @@ endif # so add a define to work silence these issues. if get_option('b_sanitize') == 'thread' pre_args += '-DTHREAD_SANITIZER=1' - # meson versions prior to 1.4 will warn "Consider using the built-in option for sanitizers ..." + # meson versions prior to 1.4 will warn "Consider using the built-in option for sanitizers ..." # later on because it only checks whether the option starts with "-fsanitize", # but there is no built-in option for adding a blacklist tsan_blacklist = '-fsanitize-blacklist=@0@'.format(join_paths(meson.project_source_root(), 'build-support', 'tsan-blacklist.txt'))