mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 11:30:11 +01:00
ci: Use mold for x86-64 and AArch64 builds
mold is a fancy new linker that's really fast. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6877 Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17992>
This commit is contained in:
parent
e9f40e42de
commit
eb6ce47d4f
7 changed files with 43 additions and 4 deletions
11
.gitlab-ci/container/build-mold.sh
Normal file
11
.gitlab-ci/container/build-mold.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
export MOLD_VERSION="1.4.1"
|
||||||
|
git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
|
||||||
|
cd mold
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
rm -rf mold
|
||||||
|
|
@ -17,7 +17,8 @@ export PATH=$CCACHE_PATH:$PATH
|
||||||
export CC="${CCACHE_PATH}/gcc"
|
export CC="${CCACHE_PATH}/gcc"
|
||||||
export CXX="${CCACHE_PATH}/g++"
|
export CXX="${CCACHE_PATH}/g++"
|
||||||
|
|
||||||
# Force linkers to gold, since it's so much faster for building. We can't use
|
# When not using the mold linker (e.g. unsupported architecture), force
|
||||||
|
# linkers to gold, since it's so much faster for building. We can't use
|
||||||
# lld because we're on old debian and it's buggy. ming fails meson builds
|
# lld because we're on old debian and it's buggy. ming fails meson builds
|
||||||
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
|
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
|
||||||
find /usr/bin -name \*-ld -o -name ld | \
|
find /usr/bin -name \*-ld -o -name ld | \
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,15 @@ sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||||
echo 'deb https://deb.debian.org/debian buster main' >/etc/apt/sources.list.d/buster.list
|
echo 'deb https://deb.debian.org/debian buster main' >/etc/apt/sources.list.d/buster.list
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
|
# Ephemeral packages (installed for this script and removed again at
|
||||||
|
# the end)
|
||||||
|
STABLE_EPHEMERAL=" \
|
||||||
|
libssl-dev \
|
||||||
|
"
|
||||||
|
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
${EXTRA_LOCAL_PACKAGES} \
|
${EXTRA_LOCAL_PACKAGES} \
|
||||||
|
${STABLE_EPHEMERAL} \
|
||||||
abootimg \
|
abootimg \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
|
|
@ -68,8 +75,12 @@ arch=armhf
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-mold.sh
|
||||||
|
|
||||||
# dependencies where we want a specific version
|
# dependencies where we want a specific version
|
||||||
EXTRA_MESON_ARGS=
|
EXTRA_MESON_ARGS=
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
|
apt-get purge -y $STABLE_EPHEMERAL
|
||||||
|
|
||||||
. .gitlab-ci/container/container_post_build.sh
|
. .gitlab-ci/container/container_post_build.sh
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ STABLE_EPHEMERAL=" \
|
||||||
autotools-dev \
|
autotools-dev \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
libtool \
|
libtool \
|
||||||
|
libssl-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
@ -58,6 +59,8 @@ export XORG_RELEASES=https://xorg.freedesktop.org/releases/individu
|
||||||
|
|
||||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-mold.sh
|
||||||
|
|
||||||
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||||
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,12 @@ EPHEMERAL="
|
||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
bzip2
|
bzip2
|
||||||
|
cmake
|
||||||
git
|
git
|
||||||
libtool
|
libtool
|
||||||
pkgconfig(epoxy)
|
pkgconfig(epoxy)
|
||||||
pkgconfig(gbm)
|
pkgconfig(gbm)
|
||||||
|
pkgconfig(openssl)
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
xz
|
xz
|
||||||
|
|
@ -83,6 +85,8 @@ tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||||
rm -rf $XORGMACROS_VERSION
|
rm -rf $XORGMACROS_VERSION
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-mold.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
. .gitlab-ci/container/build-wayland.sh
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ variables:
|
||||||
|
|
||||||
DEBIAN_X86_BUILD_IMAGE_PATH: "debian/x86_build"
|
DEBIAN_X86_BUILD_IMAGE_PATH: "debian/x86_build"
|
||||||
DEBIAN_BUILD_TAG: "2022-08-22-drop-llvm9"
|
DEBIAN_BUILD_TAG: "2022-08-22-drop-llvm9"
|
||||||
|
DEBIAN_BUILD_TAG: "2022-08-23-mold"
|
||||||
|
|
||||||
DEBIAN_X86_BUILD_MINGW_IMAGE_PATH: "debian/x86_build-mingw"
|
DEBIAN_X86_BUILD_MINGW_IMAGE_PATH: "debian/x86_build-mingw"
|
||||||
DEBIAN_BUILD_MINGW_TAG: "2022-08-17-bump"
|
DEBIAN_BUILD_MINGW_TAG: "2022-08-17-bump"
|
||||||
|
|
@ -14,7 +15,7 @@ variables:
|
||||||
DEBIAN_X86_TEST_GL_TAG: "2022-08-17-bump"
|
DEBIAN_X86_TEST_GL_TAG: "2022-08-17-bump"
|
||||||
DEBIAN_X86_TEST_VK_TAG: "2022-08-17-bump"
|
DEBIAN_X86_TEST_VK_TAG: "2022-08-17-bump"
|
||||||
|
|
||||||
FEDORA_X86_BUILD_TAG: "2022-08-17-bump"
|
FEDORA_X86_BUILD_TAG: "2022-08-23-mold"
|
||||||
KERNEL_ROOTFS_TAG: "2022-08-17-bump"
|
KERNEL_ROOTFS_TAG: "2022-08-17-bump"
|
||||||
|
|
||||||
WINDOWS_X64_VS_PATH: "windows/x64_vs"
|
WINDOWS_X64_VS_PATH: "windows/x64_vs"
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,15 @@ meson _build --native-file=native.file \
|
||||||
${EXTRA_OPTION}
|
${EXTRA_OPTION}
|
||||||
cd _build
|
cd _build
|
||||||
meson configure
|
meson configure
|
||||||
|
if command -V mold &> /dev/null ; then
|
||||||
|
mold --run ninja
|
||||||
|
else
|
||||||
ninja
|
ninja
|
||||||
|
fi
|
||||||
LC_ALL=C.UTF-8 meson test --num-processes ${FDO_CI_CONCURRENT:-4} --print-errorlogs ${MESON_TEST_ARGS}
|
LC_ALL=C.UTF-8 meson test --num-processes ${FDO_CI_CONCURRENT:-4} --print-errorlogs ${MESON_TEST_ARGS}
|
||||||
|
if command -V mold &> /dev/null ; then
|
||||||
|
mold --run ninja install
|
||||||
|
else
|
||||||
ninja install
|
ninja install
|
||||||
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue