path: root/src/gallium/drivers/vc4
diff options
authorDylan Baker <>2017-12-12 12:22:56 -0800
committerDylan Baker <>2018-01-11 15:40:02 -0800
commit2083a14179eb04d22feebc5751a1a145828d07cf (patch)
tree0fa3d2d540621d00faa6daf0c132aa5127f2dab0 /src/gallium/drivers/vc4
parent60856a7b4982aaaa4f22a002878d5d78cd63e272 (diff)
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 <>
Diffstat (limited to 'src/gallium/drivers/vc4')
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/ b/src/gallium/drivers/vc4/
index 9b816cc8fd5..ef7e7bcac5c 100644
--- a/src/gallium/drivers/vc4/
+++ b/src/gallium/drivers/vc4/
@@ -101,7 +101,7 @@ endif
libvc4 = static_library(
- [files_libvc4, v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
+ [files_libvc4, v3d_xml_pack],
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
inc_gallium_drivers, inc_drm_uapi,
@@ -109,11 +109,12 @@ libvc4 = static_library(
link_with: libvc4_neon,
c_args : [c_vis_args, simpenrose_c_args],
cpp_args : [cpp_vis_args],
- dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind],
+ dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind, idep_nir_headers],
build_by_default : false,
driver_vc4 = declare_dependency(
compile_args : '-DGALLIUM_VC4',
- link_with : [libvc4, libvc4winsys, libbroadcom_cle, libnir],
+ link_with : [libvc4, libvc4winsys, libbroadcom_cle],
+ dependencies : idep_nir,