mesa/.gitlab-ci/container/build-libclc.sh
David Heidelberg 848f59deda ci: bump from Debian 11 (bullseye) to 12 (bookworm)
Already in hard-freeze, so we don't have to worry about breaking changes.

Significant changes:
 - LLVM 15 is used instead of 11 or 13
 - /dev/shm has to be manually mounted
 - Debian 12 uses libdrm 2.4.114
 - reworked creating of rootfs, from debootstrap to mmdebstrap
 - split `create-rootfs.sh` into `lava_build.sh`, `setup-rootfs.sh`, and `strip-rootfs.sh`
 - dropped winehq repository for now (Debian wine is up-to-date enough)
 - we use wine now, no need to call explicitly call wine64
 - bumped libasan from version 6 to 8

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21977>
2023-05-25 16:06:51 +02:00

32 lines
831 B
Bash

#!/usr/bin/env bash
set -ex
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
LLVM_TAG="llvmorg-15.0.7"
$LLVM_CONFIG --version
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
git clone \
https://github.com/llvm/llvm-project \
--depth 1 \
-b "${LLVM_TAG}" \
/llvm-project
mkdir /libclc
pushd /libclc
cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG="$LLVM_CONFIG" -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
ninja
ninja install
popd
# workaroud cmake vs debian packaging.
mkdir -p /usr/lib/clc
ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
du -sh ./*
rm -rf /libclc /llvm-project