From 056802f7cd51308532d8f216f9bee6e4cf156138 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 11 Nov 2023 19:27:27 +0100 Subject: [PATCH] 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 --- debian/changelog | 5 +++-- debian/rules | 11 ++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 93e8c44e..e4a7373e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/debian/rules b/debian/rules index d4b9b8e2..8d8d034a 100755 --- a/debian/rules +++ b/debian/rules @@ -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 \