iris: add identifier BO
[mesa.git] / .gitlab-ci / container / container_pre_build.sh
1 #!/bin/sh
2
3 # Common setup among container builds before we get to building code.
4
5 export CCACHE_COMPILERCHECK=content
6 export CCACHE_COMPRESS=true
7 export CCACHE_DIR=/cache/mesa/ccache
8 export PATH=/usr/lib/ccache:$PATH
9
10 # CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
11 # Watch out, you can't have spaces in here because the renderdoc build fails.
12 export CC="/usr/lib/ccache/gcc"
13 export CXX="/usr/lib/ccache/g++"
14
15 ccache --show-stats
16
17 if uname -m | grep -q arm || uname -m | grep -q aarch64; then
18 export JFLAGS=-j8
19 else
20 export JFLAGS=-j4
21 fi
22
23 # Make a wrapper script for ninja to always include the -j flags
24 echo /usr/bin/ninja $JFLAGS '"$@"' > /usr/local/bin/ninja
25 chmod +x /usr/local/bin/ninja
26
27 # Set MAKEFLAGS so that all make invocations in container builds include the
28 # flags (doesn't apply to non-container builds, but we don't run make there)
29 export MAKEFLAGS=$JFLAGS