From dd4805fcc8644a28ce4ce390b1faa5155f922153 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 5 Dec 2024 17:16:44 -0500 Subject: [PATCH] asahi/clc: remap __FILE__ important for reproducability. wondering if we can do this in common code but not sure how yet. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Mary Guillemard Part-of: --- src/asahi/libagx/meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/asahi/libagx/meson.build b/src/asahi/libagx/meson.build index 5fa34df8b9c..230f9538e6b 100644 --- a/src/asahi/libagx/meson.build +++ b/src/asahi/libagx/meson.build @@ -16,6 +16,11 @@ prepended_input_args = [] foreach input_arg : libagx_shader_files prepended_input_args += ['--in', input_arg] endforeach + +# We need to set -fmacro-prefix-map properly for reproducability. +fs = import('fs') +relative_dir = fs.relative_to(meson.global_source_root(), meson.global_build_root()) + '/' + libagx_spv = custom_target( 'libagx.spv', input : libagx_shader_files, @@ -28,6 +33,7 @@ libagx_spv = custom_target( '-I' + join_paths(meson.current_source_dir(), '../../'), '-I' + join_paths(meson.current_source_dir(), 'shaders'), '-I' + join_paths(meson.current_build_dir(), '../genxml'), + '-fmacro-prefix-map=@0@='.format(relative_dir), ], env: ['MESA_SHADER_CACHE_DISABLE=true'], depends : [prog_mesa_clc, agx_pack],