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@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
This commit is contained in:
Dylan Baker
2020-04-24 10:58:53 -07:00
committed by Marge Bot
parent 30a393f458
commit c1a290bdd5
11 changed files with 36 additions and 39 deletions

View File

@@ -137,7 +137,7 @@ x86_build:
- .fdo.container-build@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@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:

View File

@@ -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

View File

@@ -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 \

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -19,7 +19,6 @@ STABLE_EPHEMERAL=" \
libxkbcommon-dev \
libxrandr-dev \
libxrender-dev \
meson \
p7zip \
pkg-config \
python3-distutils \

View File

@@ -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 &gt;= 0.46.0 to build.</strong>
<p><strong>Mesa requires Meson &gt;= 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>

View File

@@ -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

View File

@@ -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