ci: Switch to using gold as the linker.
[mesa.git] / .gitlab-ci / container / container_pre_build.sh
index c793e2f6b2c5fb690a1fc049b4a9235326d3a706..59c889421bcf6a476168e815e6d4a00421e855e5 100755 (executable)
@@ -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