mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-20 07:34:23 +08:00
0155881d82
While we're at it, use a tag instead of whatever happens to be the current main branch for building libclc. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833>
31 lines
770 B
Bash
31 lines
770 B
Bash
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
export LLVM_CONFIG="llvm-config-11"
|
|
|
|
$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 llvmorg-12.0.0-rc3 \
|
|
/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
|