Change the logic to disable SPIRV. Disable it on most of the versions because it needs llvm-spirv-16. Enabled on trixie/sid, Ubuntu Mantic

This commit is contained in:
Sylvestre Ledru 2023-11-11 19:27:27 +01:00
parent 80a169f8c2
commit 056802f7cd
2 changed files with 11 additions and 5 deletions

5
debian/changelog vendored
View File

@ -4,8 +4,9 @@ llvm-toolchain-16 (1:16.0.6-18) unstable; urgency=medium
* Upload to sid
[ Sylvestre Ledru ]
* Do not build spirv features on bookworm as the spirv compiler
is too old:
* Change the logic to disable SPIRV. Disable it on most of the versions because
it needs llvm-spirv-16.
Enabled on trixie/sid, Ubuntu Mantic
FAILED: spirv-mesa3d-.spv /build/source/libclc/build/spirv-mesa3d-.spv
cd /build/source/libclc/build && /usr/bin/llvm-spirv-15
--spirv-max-version=1.1 -o spirv-mesa3d-.spv builtins.link.spirv-mesa3d-.bc

11
debian/rules vendored
View File

@ -258,14 +258,18 @@ ifndef LLVM_SPIRV
LLVM_SPIRV := $(shell bash -c "command -v llvm-spirv-$(LLVM_SPIRV_VERSION)" 2>/dev/null)
endif
# Disable spirv support for most of the distro versions
# It needs llvm-spirv-16 and it is rarely available
# Be prescritive
SPIRV_DISABLE_DISTRO := bionic buster lunar jammy focal buster bullseye bookworm
ifndef LLVM_SPIRV
LLVM_SPIRV_INSTALLED = no
else
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv-$(LLVM_SPIRV_VERSION)) gt 15.0.0 ; echo $$?),0)
ifeq (,$(filter-out $(SPIRV_DISABLE_DISTRO), $(DISTRO)))
# Too old llvm-spirv version are failing. See #52200
LLVM_SPIRV_INSTALLED = yes
else
LLVM_SPIRV_INSTALLED = no
else
LLVM_SPIRV_INSTALLED = yes
endif
endif
@ -547,6 +551,7 @@ preconfigure:
@echo "COMPILER_RT_WASM_ENABLE=$(COMPILER_RT_WASM_ENABLE)"
@echo "LIBCXX_WASM_ENABLE=$(LIBCXX_WASM_ENABLE)"
@echo "SCCACHE_ENABLE=$(SCCACHE_ENABLE)"
@echo "LLVM_SPIRV=$(LLVM_SPIRV)"
@echo "LLVM_SPIRV_INSTALLED=$(LLVM_SPIRV_INSTALLED)"
for f in debian/*.in; do \