panfrost: don't always build bifrost_compiler
authorQiang Yu <yuq825@gmail.com>
Fri, 24 Apr 2020 08:20:25 +0000 (16:20 +0800)
committerMarge Bot <eric+marge@anholt.net>
Sat, 9 May 2020 01:27:41 +0000 (01:27 +0000)
src/panfrost/shared is shared with lima driver, build
bifrost_compiler for lima driver is meaningless and
get link error when only lima driver is enabled.

So only build bifrost_compiler when configued with:
  meson -Dtools=panfrost

Fixes: ec2a59cd7aa4 "panfrost: Move non-Gallium files outside of Gallium"
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4960>

meson_options.txt
src/panfrost/meson.build

index d243997902fbcfc28bade1766190a44abc812d2e..ab43150669bf08749bc004147e99cd8c834474fb 100644 (file)
@@ -332,7 +332,7 @@ option(
   'tools',
   type : 'array',
   value : [],
-  choices : ['drm-shim', 'etnaviv', 'freedreno', 'glsl', 'intel', 'intel-ui', 'nir', 'nouveau', 'xvmc', 'lima', 'all'],
+  choices : ['drm-shim', 'etnaviv', 'freedreno', 'glsl', 'intel', 'intel-ui', 'nir', 'nouveau', 'xvmc', 'lima', 'panfrost', 'all'],
   description : 'List of tools to build. (Note: `intel-ui` selects `intel`)',
 )
 option(
index 68442fd37906452ac446b80cfc50decf50a48de8..80adf9d1cd535a67bc1c39a711b754f91f8bd1b7 100644 (file)
@@ -66,5 +66,5 @@ bifrost_compiler = executable(
     libpanfrost_encoder,
     libpanfrost_midgard, # references disassemble_midgard...
   ],
-  build_by_default : true
+  build_by_default : with_tools.contains('panfrost')
 )