mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 10:14:13 +08:00
meson: remove source_root() call in nir compiler path
source_root function is deprecated in Meson version 0.56.0, so let's use instead a current_source_dir() function, available in all Meson versions. This also allows to deduplicate some code by declaring commonly used string at the top meson.build file. Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974>
This commit is contained in:
parent
ef611696a5
commit
91362340f3
@ -2251,6 +2251,8 @@ gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : []
|
||||
|
||||
devenv = environment()
|
||||
|
||||
dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/')
|
||||
|
||||
subdir('include')
|
||||
subdir('bin')
|
||||
subdir('src')
|
||||
|
@ -23,8 +23,7 @@ ir3_nir_trig_c = custom_target(
|
||||
input : 'ir3_nir_trig.py',
|
||||
output : 'ir3_nir_trig.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
@ -35,8 +34,7 @@ ir3_nir_imul_c = custom_target(
|
||||
input : 'ir3_nir_imul.py',
|
||||
output : 'ir3_nir_imul.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
|
@ -91,8 +91,7 @@ lima_nir_algebraic_c = custom_target(
|
||||
input : 'ir/lima_nir_algebraic.py',
|
||||
output : 'lima_nir_algebraic.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
|
@ -121,9 +121,7 @@ r300_nir_algebraic_c = custom_target(
|
||||
input : 'compiler/r300_nir_algebraic.py',
|
||||
output : 'r300_nir_algebraic.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
'@OUTPUT@',
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir, '@OUTPUT@',
|
||||
],
|
||||
depend_files : nir_algebraic_depends,
|
||||
)
|
||||
|
@ -68,8 +68,7 @@ zink_nir_algebraic_c = custom_target(
|
||||
input : 'nir_to_spirv/zink_nir_algebraic.py',
|
||||
output : 'zink_nir_algebraic.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
|
@ -149,8 +149,7 @@ brw_nir_trig = custom_target(
|
||||
input : 'brw_nir_trig_workarounds.py',
|
||||
output : 'brw_nir_trig_workarounds.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
depend_files : nir_algebraic_depends,
|
||||
capture : true,
|
||||
|
@ -44,8 +44,7 @@ dxil_nir_algebraic_c = custom_target(
|
||||
input : 'dxil_nir_algebraic.py',
|
||||
output : 'dxil_nir_algebraic.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
|
@ -128,8 +128,7 @@ bifrost_nir_algebraic_c = custom_target(
|
||||
input : 'bifrost_nir_algebraic.py',
|
||||
output : 'bifrost_nir_algebraic.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
|
@ -48,8 +48,7 @@ midgard_nir_algebraic_c = custom_target(
|
||||
input : 'midgard_nir_algebraic.py',
|
||||
output : 'midgard_nir_algebraic.c',
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
||||
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||
],
|
||||
capture : true,
|
||||
depend_files : nir_algebraic_depends,
|
||||
|
Loading…
Reference in New Issue
Block a user