Mesa (master): meson: Bump required version to 0.52.0

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 19:48:43 UTC 2020


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

Author: Dylan Baker <dylan.c.baker at intel.com>
Date:   Fri Apr 24 10:58:53 2020 -0700

meson: Bump required version to 0.52.0

This matches what other graphics space projects require now, and allows
us to simplify a number of cases, as well as make use of new features in
meson.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2737
Acked-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>

---

 .gitlab-ci.yml                                     | 14 +++++++-------
 .gitlab-ci/container/arm_build.sh                  |  6 ++++--
 .gitlab-ci/container/arm_test.sh                   |  4 +++-
 .gitlab-ci/container/x86_build.sh                  |  4 ++--
 .gitlab-ci/container/x86_build_old.sh              |  8 +++++++-
 .gitlab-ci/container/x86_test-base.sh              |  5 +++++
 .gitlab-ci/container/x86_test-gl.sh                |  3 ---
 .gitlab-ci/container/x86_test-vk.sh                |  1 -
 docs/meson.html                                    |  2 +-
 meson.build                                        | 22 ++++++----------------
 .../drivers/swr/rasterizer/jitter/meson.build      |  6 +-----
 11 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 028054fe012..21f464c9fba 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -137,7 +137,7 @@ x86_build:
     - .fdo.container-build at debian
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build "2020-05-18-baremetal-2"
+    FDO_DISTRIBUTION_TAG: &x86_build "2020-05-19"
 
 .use-x86_build:
   variables:
@@ -150,7 +150,7 @@ x86_build:
 x86_test-base:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-base "2020-05-26"
+    FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-01"
 
 .use-x86_test-base:
   extends:
@@ -167,19 +167,19 @@ x86_test-base:
 x86_test-gl:
   extends: .use-x86_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-05-26"
+    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-01"
 
 # Debian 10 based x86 test image for VK
 x86_test-vk:
   extends: .use-x86_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-05-26"
+    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-01"
 
 # Debian 9 based x86 build image (old LLVM)
 x86_build_old:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build_old "2019-03-18-jflags"
+    FDO_DISTRIBUTION_TAG: &x86_build_old "2020-04-27"
     FDO_DISTRIBUTION_VERSION: stretch-slim
 
 .use-x86_build_old:
@@ -195,7 +195,7 @@ arm_build:
     - .fdo.container-build at debian@arm64v8
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_build "2020-05-28-cheza-2"
+    FDO_DISTRIBUTION_TAG: &arm_build "2020-06-01"
 
 .use-arm_build:
   variables:
@@ -208,7 +208,7 @@ arm_build:
 arm_test:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_test "2020-05-28-cheza-2"
+    FDO_DISTRIBUTION_TAG: &arm_test "2020-06-01"
 
 .use-arm_test:
   variables:
diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh
index 0d09497ceef..58dd0e1bdd9 100644
--- a/.gitlab-ci/container/arm_build.sh
+++ b/.gitlab-ci/container/arm_build.sh
@@ -41,10 +41,10 @@ apt-get -y install \
 	libvulkan-dev:armhf \
 	llvm-7-dev:armhf \
 	llvm-8-dev \
-	meson \
 	pkg-config \
 	python \
 	python3-distutils \
+	python3-setuptools \
 	python3-mako \
 	python3-serial \
 	unzip \
@@ -52,6 +52,9 @@ apt-get -y install \
 	xz-utils \
 	zlib1g-dev
 
+apt install -y --no-remove -t buster-backports \
+    meson
+
 . .gitlab-ci/container/container_pre_build.sh
 
 # dependencies where we want a specific version
@@ -72,7 +75,6 @@ DEBIAN_ARCH=arm64 . .gitlab-ci/container/lava_arm.sh
 DEBIAN_ARCH=armhf . .gitlab-ci/container/lava_arm.sh
 
 apt-get purge -y \
-        python3-distutils \
         wget
 
 . .gitlab-ci/container/container_post_build.sh
diff --git a/.gitlab-ci/container/arm_test.sh b/.gitlab-ci/container/arm_test.sh
index 5b50a89a12b..bebdd2350b0 100644
--- a/.gitlab-ci/container/arm_test.sh
+++ b/.gitlab-ci/container/arm_test.sh
@@ -30,7 +30,6 @@ apt-get install -y --no-remove \
         fastboot \
         flex \
         git \
-        meson \
         netcat \
         python3-distutils \
         python3-minimal \
@@ -41,6 +40,9 @@ apt-get install -y --no-remove \
         u-boot-tools \
         unzip
 
+apt install -t buster-backports -y --no-remove \
+    meson
+
 # Cross-build test deps
 for arch in $CROSS_ARCHITECTURES; do
     apt-get install -y --no-remove \
diff --git a/.gitlab-ci/container/x86_build.sh b/.gitlab-ci/container/x86_build.sh
index 64e1e488aea..e44dbab3c8d 100644
--- a/.gitlab-ci/container/x86_build.sh
+++ b/.gitlab-ci/container/x86_build.sh
@@ -80,7 +80,6 @@ apt-get install -y --no-remove \
       llvm-6.0-dev \
       llvm-7-dev \
       llvm-9-dev \
-      meson \
       pkg-config \
       python-mako \
       python3-mako \
@@ -95,7 +94,8 @@ apt-get install -y --no-remove \
       zlib1g-dev
 
 apt-get install -y --no-remove -t buster-backports \
-      libclang-8-dev
+      libclang-8-dev \
+      meson
 
 # Cross-build Mesa deps
 for arch in $CROSS_ARCHITECTURES; do
diff --git a/.gitlab-ci/container/x86_build_old.sh b/.gitlab-ci/container/x86_build_old.sh
index 6f6f228bbb9..42b00693f45 100644
--- a/.gitlab-ci/container/x86_build_old.sh
+++ b/.gitlab-ci/container/x86_build_old.sh
@@ -45,14 +45,20 @@ apt-get install -y --no-remove \
       llvm-3.9-dev \
       llvm-4.0-dev \
       llvm-5.0-dev \
-      meson \
+      ninja-build \
       pkg-config \
       python-mako \
       python3-mako \
+      python3-pip \
+      python3-setuptools \
+      python3-wheel \
       scons \
       xz-utils \
       zlib1g-dev
 
+# We need at least 0.52.0, which is not in stretch
+python3 -m pip install meson>=0.52
+
 . .gitlab-ci/container/container_pre_build.sh
 
 ############### Uninstall unused packages
diff --git a/.gitlab-ci/container/x86_test-base.sh b/.gitlab-ci/container/x86_test-base.sh
index e79384537ea..6f8b6aaa93a 100644
--- a/.gitlab-ci/container/x86_test-base.sh
+++ b/.gitlab-ci/container/x86_test-base.sh
@@ -14,6 +14,7 @@ apt-key add .gitlab-ci/container/llvm-snapshot.gpg.key
 echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc/apt/sources.list.d/llvm9.list
 
 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
+echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
 echo 'deb https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/testing.list
 
 apt-get update
@@ -47,6 +48,7 @@ apt-get install -y --no-remove \
       libxrandr2 \
       libxrender1 \
       python \
+      python3-distutils \
       python3-mako \
       python3-numpy \
       python3-pil \
@@ -66,4 +68,7 @@ apt-get install -y --no-remove \
 apt-get purge -y \
       gnupg
 
+apt-get install -t buster-backports -y --no-remove \
+    meson
+
 apt-get autoremove -y --purge
diff --git a/.gitlab-ci/container/x86_test-gl.sh b/.gitlab-ci/container/x86_test-gl.sh
index 4ce0dc37616..fde2f820100 100644
--- a/.gitlab-ci/container/x86_test-gl.sh
+++ b/.gitlab-ci/container/x86_test-gl.sh
@@ -21,10 +21,8 @@ STABLE_EPHEMERAL=" \
       libxkbcommon-dev \
       libxrender-dev \
       make \
-      meson \
       patch \
       pkg-config \
-      python3-distutils \
       python3.7-dev \
       wget \
       xz-utils \
@@ -44,7 +42,6 @@ apt-get install -y --no-remove \
 apt-get install -y -t testing \
       $TESTING_EPHEMERAL
 
-
 . .gitlab-ci/container/container_pre_build.sh
 
 ############### Build virglrenderer
diff --git a/.gitlab-ci/container/x86_test-vk.sh b/.gitlab-ci/container/x86_test-vk.sh
index 0f544b3913e..06c1bab8996 100644
--- a/.gitlab-ci/container/x86_test-vk.sh
+++ b/.gitlab-ci/container/x86_test-vk.sh
@@ -19,7 +19,6 @@ STABLE_EPHEMERAL=" \
       libxkbcommon-dev \
       libxrandr-dev \
       libxrender-dev \
-      meson \
       p7zip \
       pkg-config \
       python3-distutils \
diff --git a/docs/meson.html b/docs/meson.html
index 58b59f86b41..94fb97c9405 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -31,7 +31,7 @@
 <p><strong>Mesa's Meson build system is generally considered stable and ready
 for production.</strong></p>
 
-<p><strong>Mesa requires Meson >= 0.46.0 to build.</strong>
+<p><strong>Mesa requires Meson >= 0.52.0 to build.</strong>
 
 <p>The Meson build of Mesa is tested on Linux, macOS, Windows, Cygwin, Haiku, FreeBSD,
 DragonflyBSD, NetBSD, and should work on OpenBSD.</p>
diff --git a/meson.build b/meson.build
index e0906dee3a6..35cc4f30052 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-# Copyright © 2017-2019 Intel Corporation
+# Copyright © 2017-2020 Intel Corporation
 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@ project(
     [find_program('python', 'python3'), 'bin/meson_get_version.py']
   ).stdout(),
   license : 'MIT',
-  meson_version : '>= 0.46',
+  meson_version : '>= 0.52',
   default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++14']
 )
 
@@ -209,10 +209,6 @@ with_gallium_swr = gallium_drivers.contains('swr')
 with_gallium_lima = gallium_drivers.contains('lima')
 with_gallium_zink = gallium_drivers.contains('zink')
 
-if cc.get_id().startswith('intel') and meson.version().version_compare('< 0.49.1')
-  error('Meson does not have sufficient support of ICC before 0.49.1 to compile mesa')
-endif
-
 with_gallium = gallium_drivers.length() != 0 and gallium_drivers != ['']
 
 if with_gallium and system_has_kms_drm
@@ -792,11 +788,7 @@ if with_platform_haiku
   pre_args += '-DHAVE_HAIKU_PLATFORM'
 endif
 
-if meson.version().version_compare('>=0.50')
-  prog_python = import('python').find_installation('python3')
-else
-  prog_python = import('python3').find_python()
-endif
+prog_python = import('python').find_installation('python3')
 has_mako = run_command(
   prog_python, '-c',
   '''
@@ -1453,11 +1445,9 @@ if with_llvm
   # has also been added, so we'll use that if we can, to cover the cmake case.
   if dep_llvm.type_name() == 'internal'
     _rtti = subproject('llvm').get_variable('has_rtti', true)
-  elif meson.version().version_compare('>=0.51')
+  else
     # The CMake finder will return 'ON', the llvm-config will return 'YES'
     _rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti'))
-  else
-    _rtti = dep_llvm.get_configtool_variable('has-rtti') == 'YES'
   endif
   if not _rtti
     if with_gallium_nouveau
@@ -1530,8 +1520,8 @@ else
 
   # Disable deprecated keyword warnings, since we have to use them for
   # old-bison compat.  See discussion in
-  # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2161
-  if meson.version().version_compare('>= 0.52.0') and find_program('bison', required : false, version : '> 2.3').found()
+  # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2161
+  if find_program('bison', required : false, version : '> 2.3').found()
     prog_bison = [prog_bison, '-Wno-deprecated']
   endif
 
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/meson.build b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
index c52f285cd37..295dc2fccb5 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/meson.build
+++ b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
@@ -21,11 +21,7 @@
 if dep_llvm.type_name() == 'internal'
   _irbuilder_h = subproject('llvm').get_variable('irbuilder_h')
 else
-  if meson.version().version_compare('>=0.51')
-    _llvm_includedir = dep_llvm.get_variable(configtool : 'includedir', cmake : 'LLVM_INCLUDE_DIR')
-  else
-    _llvm_includedir = dep_llvm.get_configtool_variable('includedir')
-  endif
+  _llvm_includedir = dep_llvm.get_variable(configtool : 'includedir', cmake : 'LLVM_INCLUDE_DIR')
   _irbuilder_h = join_paths(_llvm_includedir, 'llvm', 'IR', 'IRBuilder.h')
 endif
 



More information about the mesa-commit mailing list