Mesa (master): ci: Switch to using gold as the linker.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 18:27:43 UTC 2020


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

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Aug 13 14:21:50 2020 -0700

ci: Switch to using gold as the linker.

Debian defaults to bfd, which is comically slow.  We can't use lld because
the old version we have in the debian stable we use has various bugs.

This required bumping libwayland, which had multiply-defined symbols
issues in the previous release.

Closes: #3236

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6324>

---

 .gitlab-ci.yml                              | 24 ++++++++++++------------
 .gitlab-ci/build-apitrace.sh                |  5 ++++-
 .gitlab-ci/container/container_pre_build.sh |  7 +++++++
 .gitlab-ci/container/lava_build.sh          | 11 +++++++++++
 .gitlab-ci/container/x86_build.sh           |  2 +-
 5 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5bca218fd26..07fdd5ecc5d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -204,7 +204,7 @@ x86_build-base:
     - .fdo.container-build at debian
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build-base "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &x86_build-base "2020-08-13-gold"
 
 .use-x86_build-base:
   extends:
@@ -222,7 +222,7 @@ x86_build:
   extends:
     - .use-x86_build-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build "2020-08-08-glvnd"
+    FDO_DISTRIBUTION_TAG: &x86_build "2020-08-13-gold"
 
 .use-x86_build:
   variables:
@@ -236,7 +236,7 @@ i386_build:
   extends:
     - .use-x86_build-base
   variables:
-    FDO_DISTRIBUTION_TAG: &i386_build "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &i386_build "2020-08-13-gold"
 
 .use-i386_build:
   variables:
@@ -250,7 +250,7 @@ ppc64el_build:
   extends:
     - .use-x86_build-base
   variables:
-    FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-08-13-gold"
 
 .use-ppc64el_build:
   variables:
@@ -264,7 +264,7 @@ s390x_build:
   extends:
     - .use-x86_build-base
   variables:
-    FDO_DISTRIBUTION_TAG: &s390x_build "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &s390x_build "2020-08-13-gold"
 
 .use-s390x_build:
   variables:
@@ -277,7 +277,7 @@ s390x_build:
 x86_test-base:
   extends: x86_build-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-base "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &x86_test-base "2020-08-13-gold"
 
 .use-x86_test-base:
   extends:
@@ -294,19 +294,19 @@ x86_test-base:
 x86_test-gl:
   extends: .use-x86_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-08-14-xcb-shm"
+    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-08-24-gold"
 
 # Debian 10 based x86 test image for VK
 x86_test-vk:
   extends: .use-x86_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-08-13-gold"
 
 # Debian 9 based x86 build image (old LLVM)
 x86_build_old:
   extends: x86_build-base
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build_old "2020-07-28-x86-2"
+    FDO_DISTRIBUTION_TAG: &x86_build_old "2020-08-13-gold"
     FDO_DISTRIBUTION_VERSION: stretch-slim
 
 .use-x86_build_old:
@@ -322,7 +322,7 @@ arm_build:
     - .fdo.container-build at debian@arm64v8
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_build "2020-08-04-nfs-2"
+    FDO_DISTRIBUTION_TAG: &arm_build "2020-08-13-gold"
 
 .use-arm_build:
   variables:
@@ -337,7 +337,7 @@ arm_test-base:
     - .fdo.container-build at debian
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_test-base "2020-07-28-libdrm"
+    FDO_DISTRIBUTION_TAG: &arm_test-base "2020-08-13-gold"
 
 .use-arm_test-base:
   extends:
@@ -355,7 +355,7 @@ arm64_test:
   extends:
     - .use-arm_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &arm64_test "2020-08-18"
+    FDO_DISTRIBUTION_TAG: &arm64_test "2020-08-24-gold"
 
 .use-arm64_test:
   variables:
diff --git a/.gitlab-ci/build-apitrace.sh b/.gitlab-ci/build-apitrace.sh
index 8b44b66a2ce..f441108f338 100644
--- a/.gitlab-ci/build-apitrace.sh
+++ b/.gitlab-ci/build-apitrace.sh
@@ -23,7 +23,10 @@ APITRACE_VERSION="9.0"
 git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
 pushd /apitrace
 git checkout "$APITRACE_VERSION"
-cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
+# Note: The cmake stuff for waffle in apitrace fails to use waffle's library
+# directory.  Just force the issue here.
+env LDFLAGS="-L/usr/local/lib" \
+    cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
 ninja -C _build
 mkdir build
 cp _build/apitrace build
diff --git a/.gitlab-ci/container/container_pre_build.sh b/.gitlab-ci/container/container_pre_build.sh
index c793e2f6b2c..59c889421bc 100755
--- a/.gitlab-ci/container/container_pre_build.sh
+++ b/.gitlab-ci/container/container_pre_build.sh
@@ -12,6 +12,13 @@ export PATH=/usr/lib/ccache:$PATH
 export CC="/usr/lib/ccache/gcc"
 export CXX="/usr/lib/ccache/g++"
 
+# 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
+# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
+find /usr/bin -name \*-ld -o -name ld | \
+    grep -v mingw | \
+    xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
+
 ccache --show-stats
 
 # Make a wrapper script for ninja to always include the -j flags
diff --git a/.gitlab-ci/container/lava_build.sh b/.gitlab-ci/container/lava_build.sh
index ed10c7883a8..4e945d4bcf8 100755
--- a/.gitlab-ci/container/lava_build.sh
+++ b/.gitlab-ci/container/lava_build.sh
@@ -134,6 +134,17 @@ rm -rf /libdrm
 mkdir -p kernel
 wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel
 pushd kernel
+
+# The kernel doesn't like the gold linker (or the old lld in our debians).
+# Sneak in some override symlinks during kernel build until we can update
+# debian (they'll get blown away by the rm of the kernel dir at the end).
+mkdir -p ld-links
+for i in /usr/bin/*-ld /usr/bin/ld; do
+    i=`basename $i`
+    ln -sf /usr/bin/$i.bfd ld-links/$i
+done
+export PATH=`pwd`/ld-links:$PATH
+
 ./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/${KERNEL_ARCH}.config
 make ${KERNEL_IMAGE_NAME}
 for image in ${KERNEL_IMAGE_NAME}; do
diff --git a/.gitlab-ci/container/x86_build.sh b/.gitlab-ci/container/x86_build.sh
index f0b63539f51..75a45ea8231 100644
--- a/.gitlab-ci/container/x86_build.sh
+++ b/.gitlab-ci/container/x86_build.sh
@@ -58,7 +58,7 @@ export           WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
 export         XORGMACROS_VERSION=util-macros-1.19.0
 export           XCBPROTO_VERSION=xcb-proto-1.13
 export             LIBXCB_VERSION=libxcb-1.13
-export         LIBWAYLAND_VERSION=wayland-1.15.0
+export         LIBWAYLAND_VERSION=wayland-1.17.0
 export  WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.12
 
 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2



More information about the mesa-commit mailing list