2020-03-06 21:23:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-02-11 23:44:56 +00:00
|
|
|
# Common setup among container builds before we get to building code.
|
|
|
|
|
2020-03-06 21:23:20 +00:00
|
|
|
export CCACHE_COMPILERCHECK=content
|
|
|
|
export CCACHE_COMPRESS=true
|
|
|
|
export CCACHE_DIR=/cache/mesa/ccache
|
|
|
|
export PATH=/usr/lib/ccache:$PATH
|
|
|
|
|
2020-03-11 18:11:19 +00:00
|
|
|
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
|
|
|
|
# Watch out, you can't have spaces in here because the renderdoc build fails.
|
|
|
|
export CC="/usr/lib/ccache/gcc"
|
|
|
|
export CXX="/usr/lib/ccache/g++"
|
|
|
|
|
2020-08-13 22:21:50 +01:00
|
|
|
# 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' '{}'
|
|
|
|
|
2020-03-06 21:23:20 +00:00
|
|
|
ccache --show-stats
|
2020-02-11 23:44:56 +00:00
|
|
|
|
|
|
|
# Make a wrapper script for ninja to always include the -j flags
|
2020-06-26 18:59:41 +01:00
|
|
|
echo '#!/bin/sh -x' > /usr/local/bin/ninja
|
|
|
|
echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"' >> /usr/local/bin/ninja
|
2020-02-11 23:44:56 +00:00
|
|
|
chmod +x /usr/local/bin/ninja
|
|
|
|
|
|
|
|
# Set MAKEFLAGS so that all make invocations in container builds include the
|
|
|
|
# flags (doesn't apply to non-container builds, but we don't run make there)
|
2020-06-26 18:59:41 +01:00
|
|
|
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
|