vc4: Fix meson build when enabled without v3d.
authorEric Anholt <eric@anholt.net>
Mon, 30 Jul 2018 02:11:53 +0000 (19:11 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 30 Jul 2018 02:13:29 +0000 (19:13 -0700)
Reported-by: Rob Clark <robdclark@gmail.com>
Fixes: e92959c4e03c ("v3d: Pass the whole clif_dump structure to v3d_print_group().")
src/broadcom/compiler/meson.build
src/broadcom/meson.build
src/broadcom/qpu/meson.build
src/gallium/drivers/vc4/meson.build

index 1bd43bf2c2da496070742056b06ec016cbed769c..86ef365aa5c9cc4d5f1800036753132832707311 100644 (file)
@@ -47,3 +47,5 @@ libbroadcom_compiler = static_library(
   dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
   build_by_default : false,
 )
+
+v3d_libs += libbroadcom_compiler
index e4f571526134ba37cf7950b9e57f606c68ee132d..d3ea362f200fee9bf46b8a4b27215a5d9d0d3a5f 100644 (file)
@@ -23,35 +23,36 @@ inc_broadcom = include_directories('.', 'cle')
 subdir('cle')
 
 v3d_versions = ['33', '41', '42']
+v3d_libs = []
 
 if with_gallium_v3d
   subdir('compiler')
   subdir('qpu')
+endif
 
-  per_version_libs = []
-  foreach ver : v3d_versions
-    per_version_libs += static_library(
-      'libbroadcom-v' + ver,
-      [
-        files('clif/v3dx_dump.c'),
-        v3d_xml_pack
-      ],
-      include_directories : [inc_common, inc_broadcom, inc_src],
-      c_args : [c_vis_args, no_override_init_args, '-DV3D_VERSION=' + ver],
-      dependencies: [dep_valgrind, dep_thread],
-    )
-  endforeach
-
-  libbroadcom_v3d = static_library(
-    'libbroadcom_v3d',
+per_version_libs = []
+foreach ver : v3d_versions
+  per_version_libs += static_library(
+    'libbroadcom-v' + ver,
     [
-      files('common/v3d_debug.c', 'clif/clif_dump.c'),
-      v3d_xml_pack,
+      files('clif/v3dx_dump.c'),
+      v3d_xml_pack
     ],
     include_directories : [inc_common, inc_broadcom, inc_src],
-    c_args : [c_vis_args, no_override_init_args],
-    link_whole : [libbroadcom_compiler, libbroadcom_qpu] + per_version_libs,
-    build_by_default : false,
+    c_args : [c_vis_args, no_override_init_args, '-DV3D_VERSION=' + ver],
     dependencies: [dep_valgrind, dep_thread],
   )
-endif
+endforeach
+
+libbroadcom_v3d = static_library(
+  'libbroadcom_v3d',
+  [
+    files('common/v3d_debug.c', 'clif/clif_dump.c'),
+    v3d_xml_pack,
+  ],
+  include_directories : [inc_common, inc_broadcom, inc_src],
+  c_args : [c_vis_args, no_override_init_args],
+  link_whole : v3d_libs + per_version_libs,
+  build_by_default : false,
+  dependencies: [dep_valgrind, dep_thread],
+)
index 5521a80ceeca9ca39bfa9b96854901566e800558..8a40016064d8362bc598eb4458561a4201ab1b63 100644 (file)
@@ -33,6 +33,8 @@ libbroadcom_qpu = static_library(
   build_by_default : false,
 )
 
+v3d_libs += libbroadcom_qpu
+
 test(
   'qpu_disasm',
   executable(
index ef7e7bcac5cfbd4044c13bf5b419450a750d98dc..50adcc25f25f6a5d6a2e32797db9bf5bac4b9db0 100644 (file)
@@ -115,6 +115,6 @@ libvc4 = static_library(
 
 driver_vc4 = declare_dependency(
   compile_args : '-DGALLIUM_VC4',
-  link_with : [libvc4, libvc4winsys, libbroadcom_cle],
+  link_with : [libvc4, libvc4winsys, libbroadcom_cle, libbroadcom_v3d],
   dependencies : idep_nir,
 )