Compiler for the VC4CL OpenCL-implementation. This compiler supports OpenCL C (via LLVM or SPIRV-LLVM), LLVM-IR and SPIR-V code, depending on the build configuration.
The following configuration variables can be set in CMake:
BUILD_TESTING
toggles building of test programCMAKE_BUILD_TYPE
set to Debug, Release, RelWithDebInfo, asan, tsan or usbsan to build for the given debug/release mode or with sanitizers enabledVC4CL_STDLIB_DIR
specifies an optional folder where the development headers for the GPU-side VC4CLStdLib are located, by default looks in ../VC4CLStdLib/include/
CROSS_COMPILE
toggles whether to cross-compile for the Raspberry Pi. NOTE: The Raspberry Pi cross-compiler is no longer supported, since it is based on an ancient GCC 4.9CROSS_COMPILER_PATH
sets the root path to the cross compiler to useSPIRV_FRONTEND
toggles building of the SPIR-V front-end, requires SPIRV-LLVMSPIRV_COMPILER_ROOT
sets the root-path to binaries of the SPIRV-LLVM compiler, defaults to /opt/SPIRV-LLVM/build/bin/
SPIRV_TRANSLATOR_ROOT
sets the root path to the binaries of the SPIRV-LLVM Translator compiler, defaults to /opt/SPIRV-LLVM-Translator/build/tools/llvm-spirv/
. This takes precedence over SPIRV_COMPILER_ROOT
LLVMLIB_FRONTEND
enables the LLVM library front-end which uses the LLVM library to parse the LLVM IR module generated by the pre-compilation (recommended!)CLANG_LIBRARY
enables the experimental clang library precompilation as alternative to running clang as a separate processRun cpack -G DEB
to create a debian package.
NOTE: Any compilation error when packaging can be ignored!
If the VC4CLStdLib is updated, the LLVM pre-compiled header (PCH) needs to be rebuilt. For this to happen, simply delete the file VC4CLStdLib.h.pch
(located in the source/installation directory of the VC4CLStdLib project, depending on whether it was installed) and rebuild the VC4C compiler (or just the vc4cl-stdlib
target).
When BUILD_TESTING
is on, some of the files (TestConversionFunctions.cpp.o
) have to be compiled in one thread (make -j 1
).