mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
meson: make CL args common
this will let us unify behaviour across drivers a bit more. no functional change here. (intel is specifically excluded to avoid a functional change.) Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
This commit is contained in:
parent
54912281a0
commit
f35172b6a4
4 changed files with 7 additions and 10 deletions
|
|
@ -44,6 +44,10 @@ with_mesa_debug = get_option('buildtype') == 'debug'
|
||||||
# This means the final value of b_ndebug==true
|
# This means the final value of b_ndebug==true
|
||||||
with_mesa_ndebug = get_option('b_ndebug') == 'true' or (get_option('buildtype') == 'release' and get_option('b_ndebug') == 'if-release')
|
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())
|
||||||
|
cl_args = ['-fmacro-prefix-map=@0@/='.format(relative_dir)]
|
||||||
|
|
||||||
# Arguments for the preprocessor, put these in a separate array from the C and
|
# Arguments for the preprocessor, put these in a separate array from the C and
|
||||||
# C++ (cpp in meson terminology) arguments since they need to be added to the
|
# C++ (cpp in meson terminology) arguments since they need to be added to the
|
||||||
# default arguments for both C and C++.
|
# default arguments for both C and C++.
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@ libagx_shader_files = files(
|
||||||
'helper.cl',
|
'helper.cl',
|
||||||
)
|
)
|
||||||
|
|
||||||
# We need to set -fmacro-prefix-map properly for reproducability.
|
|
||||||
relative_dir = fs.relative_to(meson.global_source_root(), meson.global_build_root()) + '/'
|
|
||||||
|
|
||||||
libagx_spv = custom_target(
|
libagx_spv = custom_target(
|
||||||
input : libagx_shader_files,
|
input : libagx_shader_files,
|
||||||
output : 'libagx.spv',
|
output : 'libagx.spv',
|
||||||
|
|
@ -26,7 +23,7 @@ libagx_spv = custom_target(
|
||||||
'-I' + join_paths(meson.current_source_dir(), '../../'),
|
'-I' + join_paths(meson.current_source_dir(), '../../'),
|
||||||
'-I' + join_paths(meson.current_source_dir(), 'shaders'),
|
'-I' + join_paths(meson.current_source_dir(), 'shaders'),
|
||||||
'-I' + join_paths(meson.current_build_dir(), '../genxml'),
|
'-I' + join_paths(meson.current_build_dir(), '../genxml'),
|
||||||
'-fmacro-prefix-map=@0@='.format(relative_dir),
|
cl_args,
|
||||||
],
|
],
|
||||||
depends : [agx_pack],
|
depends : [agx_pack],
|
||||||
depfile : 'libagx_shaders.h.d',
|
depfile : 'libagx_shaders.h.d',
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ nvkcl_spv = custom_target(
|
||||||
prog_mesa_clc, '-o', '@OUTPUT@', '--depfile', '@DEPFILE@', nvkcl_files, '--',
|
prog_mesa_clc, '-o', '@OUTPUT@', '--depfile', '@DEPFILE@', nvkcl_files, '--',
|
||||||
'-I' + join_paths(meson.current_source_dir(), '.'),
|
'-I' + join_paths(meson.current_source_dir(), '.'),
|
||||||
'-I' + join_paths(meson.project_source_root(), 'src'),
|
'-I' + join_paths(meson.project_source_root(), 'src'),
|
||||||
'-fmacro-prefix-map=@0@/='.format(relative_dir),
|
cl_args,
|
||||||
],
|
],
|
||||||
depfile : '@PLAINNAME@.d',
|
depfile : '@PLAINNAME@.d',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,6 @@ libpan_shader_files = files(
|
||||||
'query_pool.cl',
|
'query_pool.cl',
|
||||||
)
|
)
|
||||||
|
|
||||||
# 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()) + '/'
|
|
||||||
|
|
||||||
idep_libpan_per_arch = {}
|
idep_libpan_per_arch = {}
|
||||||
|
|
||||||
foreach ver : ['4', '5', '6', '7', '9', '10']
|
foreach ver : ['4', '5', '6', '7', '9', '10']
|
||||||
|
|
@ -25,7 +21,7 @@ foreach ver : ['4', '5', '6', '7', '9', '10']
|
||||||
'-I' + join_paths(meson.current_source_dir(), '../../'),
|
'-I' + join_paths(meson.current_source_dir(), '../../'),
|
||||||
'-I' + join_paths(meson.current_source_dir(), '../lib/'),
|
'-I' + join_paths(meson.current_source_dir(), '../lib/'),
|
||||||
'-I' + join_paths(meson.current_build_dir(), '../lib/'),
|
'-I' + join_paths(meson.current_build_dir(), '../lib/'),
|
||||||
'-fmacro-prefix-map=@0@='.format(relative_dir),
|
cl_args,
|
||||||
],
|
],
|
||||||
env: ['MESA_SHADER_CACHE_DISABLE=true'],
|
env: ['MESA_SHADER_CACHE_DISABLE=true'],
|
||||||
depends : [pan_packers],
|
depends : [pan_packers],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue