meson: Use dependencies for nir
This creates two new internal dependencies, idep_nir_headers and idep_nir. The former encapsulates the generation of nir_opcodes.h and nir_builder_opcodes.h and adding src/compiler/nir as an include path. This ensures that any target that needs nir headers will have the includes and that the generated headers will be generated before the target is build. The second, idep_nir, includes the first and additionally links to libnir. This is intended to make it easier to avoid race conditions in the build when using nir, since the number of consumers for libnir and it's headers are quite high. Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
This commit is contained in:
@@ -58,9 +58,9 @@ subdir('nir')
|
||||
spirv2nir = executable(
|
||||
'spirv2nir',
|
||||
[files('spirv/spirv2nir.c'), dummy_cpp],
|
||||
dependencies : [dep_m, dep_thread],
|
||||
dependencies : [dep_m, dep_thread, idep_nir],
|
||||
include_directories : [inc_common, inc_nir, include_directories('spirv')],
|
||||
link_with : [libnir, libmesa_util],
|
||||
link_with : libmesa_util,
|
||||
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
Reference in New Issue
Block a user