%general-entities; ]> SPIRV-LLVM-Translator-&spirv-llvm-trans-version; SPIRV-LLVM-Translator Introduction to SPIRV-LLVM-Translator SPIRV-LLVM-Translator is a tool and a library for bi-directional translation between SPIR-V and LLVM IR. &lfs121_checked; Download (HTTP): Download (FTP): SPIRV-LLVM-Translator Dependencies Required , (with Clang), , and Installation of SPIRV-LLVM-Translator This tarball is v&spirv-llvm-trans-version;.tar.gz. v&spirv-llvm-trans-version;.tar.gz will extract to the directory SPIRV-LLVM-Translator-&spirv-llvm-trans-version;. Install SPIRV-LLVM-Translator by running the following commands: mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \ -G Ninja .. && ninja To test the results, issue: ninja test. Now, as the &root; user: ninja install 32-bit Installation of SPIRV-LLVM-Translator First clean the build directory: rm -rf * Install lib32-SPIRV-LLVM-Translator by running the following commands: CC="gcc -m32" CXX="g++ -m32" \ PKG_CONFIG_PATH=/usr/lib32/pkgconfig \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib32 \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \ -G Ninja .. && ninja Now, as the &root; user: DESTDIR=$PWD/DESTDIR ninja install cp -vr DESTDIR/usr/lib32/* /usr/lib32 rm -rf DESTDIR ldconfig Command Explanations -DBUILD_SHARED_LIBS=ON: This switch forces the build system to install shared libraries instead of static libraries. -DLLVM_EXTERNAL_SPIRV_HEADERS_*: These switches tells the build system that is installed in /usr and /usr/include/spirv/. This is needed since the build system tries to download and use the downloaded headers not on the system. Contents Installed Programs Installed Libraries Installed Directories llvm-spirv libLLVMSPIRVLib.so /usr/include/libLLVMSPIRVLib Short Descriptions llvm-spirv translates LLVM bitcode and SPIR-V binaries llvm-spirv libLLVMSPIRVLib.so contains functions for translating between SPIR-V and LLVM IR libLLVMSPIRVLib.so