Module: Mesa
Branch: master
Commit: 81a0f1eca24b8605b9f2506122ff90db7129c39e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=81a0f1eca24b8605b9f2506122ff90db7129c39e

Author: Eric Anholt <[email protected]>
Date:   Mon Oct 19 12:28:17 2020 -0700

meson: Only require libexpat when a part of the build needs it.

Now that xmlconfig can be built without libexpat on Android, we can make
android builds not require the presence of libexpat for many drivers.

Reviewed-by: Kristian H. Kristensen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7223>

---

 meson.build     | 6 +++++-
 src/meson.build | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index f1e4118fd5d..a4aec1745d5 100644
--- a/meson.build
+++ b/meson.build
@@ -276,6 +276,9 @@ with_freedreno_kgsl = get_option('freedreno-kgsl')
 with_broadcom_vk = _vulkan_drivers.contains('broadcom')
 with_any_vk = _vulkan_drivers.length() != 0
 
+with_any_broadcom = with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk
+with_any_intel = with_dri_i965 or with_intel_vk or with_gallium_iris
+
 if with_swrast_vk and not with_gallium_softpipe
   error('swrast vulkan requires gallium swrast')
 endif
@@ -1365,7 +1368,8 @@ if dep_thread.found() and host_machine.system() != 
'windows'
   endif
 endif
 if host_machine.system() != 'windows'
-  dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'])
+  dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'],
+                         required: not with_platform_android or 
with_any_broadcom or with_any_intel)
 else
   dep_expat = null_dep
 endif
diff --git a/src/meson.build b/src/meson.build
index b39ea7dbb8b..a175e33cd4f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -73,7 +73,7 @@ endif
 if with_gallium_radeonsi or with_amd_vk
   subdir('amd')
 endif
-if with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk
+if with_any_broadcom
   subdir('broadcom')
 endif
 if with_gallium_etnaviv
@@ -88,7 +88,7 @@ endif
 if with_gallium_virgl
   subdir('virtio')
 endif
-if with_dri_i965 or with_intel_vk or with_gallium_iris
+if with_any_intel
   subdir('intel')
 endif
 subdir('mesa')

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to