From 2083a14179eb04d22feebc5751a1a145828d07cf Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 12 Dec 2017 12:22:56 -0800 Subject: 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 Signed-off-by: Dylan Baker --- src/compiler/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/meson.build') diff --git a/src/compiler/meson.build b/src/compiler/meson.build index 783be11c926..d86bdde61d8 100644 --- a/src/compiler/meson.build +++ b/src/compiler/meson.build @@ -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, ) -- cgit v1.2.3