Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
libclc: Disable SPIRV targets
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
  • Loading branch information
pmenzel committed Aug 5, 2021
1 parent 9b111e3 commit 32e3fb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libclc.be0
Expand Up @@ -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} "${@}"
Expand Down

0 comments on commit 32e3fb9

Please sign in to comment.