Mesa (master): meson: error out if platforms contains empty string

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 24 05:53:14 UTC 2019


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

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Tue Jun 18 13:50:52 2019 +0300

meson: error out if platforms contains empty string

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110939
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>

---

 meson.build | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meson.build b/meson.build
index d8a48bd6994..31bb0dd04ea 100644
--- a/meson.build
+++ b/meson.build
@@ -278,6 +278,10 @@ with_platform_surfaceless = _platforms.contains('surfaceless')
 
 with_platforms = false
 if _platforms.length() != 0 and _platforms != ['']
+  # sanity check that list contains no empty strings
+  if _platforms.contains('')
+    error('Invalid argument list given to -Dplatforms, please fix.')
+  endif
   with_platforms = true
   egl_native_platform = _platforms[0]
 endif




More information about the mesa-commit mailing list