Mesa (master): meson: fix android vulkan build

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 14 10:05:43 UTC 2020


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

Author: Eric Engestrom <eric at engestrom.ch>
Date:   Sat Jul 11 10:17:30 2020 +0200

meson: fix android vulkan build

Android doesn't have `pthread_cancel()` and is unlikely to ever
implement it [1], but `wsi_common_display.c` needs it (or an
alternative).

Let's just disable the platform on Android (as it used to be
before 448eb19158f483d807ef).

[1] https://android-review.googlesource.com/c/platform/bionic/+/1215779/1/docs/status.md

Fixes: 448eb19158f483d807ef ("vulkan: automatically compile the `display` platform when available")
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
Acked-by: Nataraj Deshpande <nataraj.deshpande at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5860>

---

 src/amd/vulkan/meson.build       | 2 +-
 src/freedreno/vulkan/meson.build | 2 +-
 src/intel/vulkan/meson.build     | 2 +-
 src/vulkan/meson.build           | 2 +-
 src/vulkan/wsi/meson.build       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index aa27b82c98a..e5fba9de21b 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -131,7 +131,7 @@ if with_platform_wayland
   libradv_files += files('radv_wsi_wayland.c')
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   radv_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   libradv_files += files('radv_wsi_display.c')
 endif
diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build
index eab543e1c12..8696f246da0 100644
--- a/src/freedreno/vulkan/meson.build
+++ b/src/freedreno/vulkan/meson.build
@@ -81,7 +81,7 @@ if with_platform_wayland
   libtu_files += files('tu_wsi_wayland.c')
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   tu_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   libtu_files += files('tu_wsi_display.c')
 endif
diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
index aff495506d3..2d37fa0eb5e 100644
--- a/src/intel/vulkan/meson.build
+++ b/src/intel/vulkan/meson.build
@@ -155,7 +155,7 @@ if with_platform_wayland
   libanv_files += files('anv_wsi_wayland.c')
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   anv_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   libanv_files += files('anv_wsi_display.c')
 endif
diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build
index 1e3f65c18d0..ae84e0d739d 100644
--- a/src/vulkan/meson.build
+++ b/src/vulkan/meson.build
@@ -45,7 +45,7 @@ if with_platform_wayland
   vulkan_wsi_deps += dep_wayland_client
   vulkan_wsi_list += ['wayland']
 endif
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   vulkan_wsi_args += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   vulkan_wsi_deps += [dep_libdrm]
   vulkan_wsi_list += ['drm']
diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build
index 0186ca6d4a1..687f5894882 100644
--- a/src/vulkan/wsi/meson.build
+++ b/src/vulkan/wsi/meson.build
@@ -34,7 +34,7 @@ if with_platform_wayland
   ]
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   files_vulkan_wsi += files('wsi_common_display.c')
 endif
 



More information about the mesa-commit mailing list