diff --git a/.gitlab-ci/container/container_pre_build.sh b/.gitlab-ci/container/container_pre_build.sh index f7ea075691f..f9825cff50d 100755 --- a/.gitlab-ci/container/container_pre_build.sh +++ b/.gitlab-ci/container/container_pre_build.sh @@ -27,9 +27,14 @@ fi # 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. mingw fails meson builds # with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker" -find /usr/bin -name \*-ld -o -name ld | \ +if [ -e /usr/bin/ld.gold ]; then + find /usr/bin -name \*-ld -o -name ld | \ grep -v mingw | \ xargs -n 1 -I '{}' ln -sf '{}.gold' '{}' +else + echo "ld.gold is missing, not replacing ld with it." + echo "Builds might be slower, consider installing gold." +fi # Make a wrapper script for ninja to always include the -j flags {