From 32e3fb94dac30b8554bc62f53adabf1ee3a9f8db Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 5 Aug 2021 12:37:12 +0200 Subject: [PATCH] libclc: Disable SPIRV targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building all targets fails due to the check below: if( "spirv-mesa3d-" IN_LIST LIBCLC_TARGETS_TO_BUILD OR "spirv64-mesa3d-" IN_LIST LIBCLC_TARGETS_TO_BUILD ) if( NOT LLVM_SPIRV ) message( FATAL_ERROR "SPIR-V targets requested, but spirv-tools is not installed" ) endif() endif() The failure is: LLVM cxx flags: -I/usr/include;-std=c++14;;;-fno-exceptions;-D_GNU_SOURCE;-D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS;-fno-rtti;-fno-exceptions clang: /usr/bin/clang llvm-as: /usr/bin/llvm-as llvm-link: /usr/bin/llvm-link opt: /usr/bin/opt llvm-spirv: LLVM_SPIRV-NOTFOUND CMake Error at CMakeLists.txt:115 (message): SPIR-V targets requested, but spirv-tools is not installed -- Configuring incomplete, errors occurred! See also "/dev/shm/bee-pmenzel/libclc/libclc-12.0.1-0/build/CMakeFiles/CMakeOutput.log". List of all targets: * amdgcn-- * amdgcn--amdhsa * r600-- * nvptx-- * nvptx64-- * nvptx--nvidiacl * nvptx64--nvidiacl * spirv-mesa3d- * spirv64-mesa3d- As LLVM_SPIRV/llvm_spirv is not shipped in MarIuX, and it’s unclear how to package it (maybe [LLVM-SPIRV-Backend][1]), do it [as Debian does it][2], and disable the SPIRV targets, by only building the non-SPIRV targets. [1]: https://github.com/KhronosGroup/LLVM-SPIRV-Backend [2]: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/a5528e133ea546feaa48f13f734b94e5744960bc/debian/rules#L544 --- libclc.be0 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libclc.be0 b/libclc.be0 index 6b5d9ddc6..3402b7079 100755 --- a/libclc.be0 +++ b/libclc.be0 @@ -18,9 +18,10 @@ SRCURL[0]="https://github.com/llvm/llvm-project/releases/download/llvmorg-${PKGV # bee_patch "${@}" #} -#mee_configure() { -# bee_configure -#} +mee_configure() { + bee_configure \ + -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" +} #mee_build() { # start_cmd ninja -v -C ${B} ${BEE_NINJAFLAGS} "${@}"