mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01: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
9 changed files with 11 additions and 19 deletions
|
|
@ -2251,6 +2251,8 @@ gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : []
|
||||||
|
|
||||||
devenv = environment()
|
devenv = environment()
|
||||||
|
|
||||||
|
dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/')
|
||||||
|
|
||||||
subdir('include')
|
subdir('include')
|
||||||
subdir('bin')
|
subdir('bin')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ ir3_nir_trig_c = custom_target(
|
||||||
input : 'ir3_nir_trig.py',
|
input : 'ir3_nir_trig.py',
|
||||||
output : 'ir3_nir_trig.c',
|
output : 'ir3_nir_trig.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
@ -35,8 +34,7 @@ ir3_nir_imul_c = custom_target(
|
||||||
input : 'ir3_nir_imul.py',
|
input : 'ir3_nir_imul.py',
|
||||||
output : 'ir3_nir_imul.c',
|
output : 'ir3_nir_imul.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,7 @@ lima_nir_algebraic_c = custom_target(
|
||||||
input : 'ir/lima_nir_algebraic.py',
|
input : 'ir/lima_nir_algebraic.py',
|
||||||
output : 'lima_nir_algebraic.c',
|
output : 'lima_nir_algebraic.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
|
||||||
|
|
@ -121,9 +121,7 @@ r300_nir_algebraic_c = custom_target(
|
||||||
input : 'compiler/r300_nir_algebraic.py',
|
input : 'compiler/r300_nir_algebraic.py',
|
||||||
output : 'r300_nir_algebraic.c',
|
output : 'r300_nir_algebraic.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir, '@OUTPUT@',
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
'@OUTPUT@',
|
|
||||||
],
|
],
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,7 @@ zink_nir_algebraic_c = custom_target(
|
||||||
input : 'nir_to_spirv/zink_nir_algebraic.py',
|
input : 'nir_to_spirv/zink_nir_algebraic.py',
|
||||||
output : 'zink_nir_algebraic.c',
|
output : 'zink_nir_algebraic.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,7 @@ brw_nir_trig = custom_target(
|
||||||
input : 'brw_nir_trig_workarounds.py',
|
input : 'brw_nir_trig_workarounds.py',
|
||||||
output : 'brw_nir_trig_workarounds.c',
|
output : 'brw_nir_trig_workarounds.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
capture : true,
|
capture : true,
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,7 @@ dxil_nir_algebraic_c = custom_target(
|
||||||
input : 'dxil_nir_algebraic.py',
|
input : 'dxil_nir_algebraic.py',
|
||||||
output : 'dxil_nir_algebraic.c',
|
output : 'dxil_nir_algebraic.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,7 @@ bifrost_nir_algebraic_c = custom_target(
|
||||||
input : 'bifrost_nir_algebraic.py',
|
input : 'bifrost_nir_algebraic.py',
|
||||||
output : 'bifrost_nir_algebraic.c',
|
output : 'bifrost_nir_algebraic.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,7 @@ midgard_nir_algebraic_c = custom_target(
|
||||||
input : 'midgard_nir_algebraic.py',
|
input : 'midgard_nir_algebraic.py',
|
||||||
output : 'midgard_nir_algebraic.c',
|
output : 'midgard_nir_algebraic.c',
|
||||||
command : [
|
command : [
|
||||||
prog_python, '@INPUT@',
|
prog_python, '@INPUT@', '-p', dir_compiler_nir,
|
||||||
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
|
|
||||||
],
|
],
|
||||||
capture : true,
|
capture : true,
|
||||||
depend_files : nir_algebraic_depends,
|
depend_files : nir_algebraic_depends,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue