From 6afe429b7c935335bd9382842ae5bc51095b550a Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Mon, 15 Sep 2025 10:50:44 +0200 Subject: [PATCH] meson: replace global_source_root/global_build_root with project_* global_source_root() and global_build_root() typically shouldn't be used in case the current project can be used as a subproject as it'll return the path to the main project[1][2]. Instead, let's do as suggested by the documentation and use project_source_root() and project_build_root() instead. [1] https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonglobal_source_root [2] https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonglobal_build_root Suggested-by: Eric Engestrom Signed-off-by: Quentin Schulz Part-of: --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 00d3969a0a5..67ce350271a 100644 --- a/meson.build +++ b/meson.build @@ -48,7 +48,7 @@ with_mesa_debug = get_option('buildtype') == 'debug' with_mesa_ndebug = get_option('b_ndebug') == 'true' or (get_option('buildtype') == 'release' and get_option('b_ndebug') == 'if-release') # We need to set -fmacro-prefix-map properly for driver CL reproducability. -relative_dir = fs.relative_to(meson.global_source_root(), meson.global_build_root()) +relative_dir = fs.relative_to(meson.project_source_root(), meson.project_build_root()) cl_args = [ '-fmacro-prefix-map=@0@/='.format(relative_dir),