ac41eb872b9427d552a3ab64f2d95b5039bf40cf
[mesa.git] / .gitlab-ci / meson-build.sh
1 #!/bin/bash
2
3 set -e
4 set -o xtrace
5
6 # We need to control the version of llvm-config we're using, so we'll
7 # generate a native file to do so. This requires meson >=0.49
8 if test -n "$LLVM_VERSION"; then
9 LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
10 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
11 $LLVM_CONFIG --version
12 else
13 touch native.file
14 fi
15
16 meson _build --native-file=native.file \
17 -D buildtype=debug \
18 -D build-tests=true \
19 -D libunwind=${UNWIND} \
20 ${DRI_LOADERS} \
21 -D dri-drivers=${DRI_DRIVERS:-[]} \
22 ${GALLIUM_ST} \
23 -D gallium-drivers=${GALLIUM_DRIVERS:-[]} \
24 -D vulkan-drivers=${VULKAN_DRIVERS:-[]} \
25 -D I-love-half-baked-turnips=true
26 cd _build
27 meson configure
28 ninja -j4
29 LC_ALL=C.UTF-8 ninja test