The glslc program is Google's command line compiler for OpenGL Shading Language/High Level Shading Language (GLSL/HLSL) to Standard Portable Intermediate Representation (SPIR-V).
Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
Download (HTTP): https://github.com/google/shaderc/archive/v2024.3/shaderc-2024.3.tar.gz
Download MD5 sum: e8d45a77fe8bc954c3ca79aeba8476bd
Download size: 224 KB
Estimated disk space required: 3.9 MB
Estimated build time: less than 0.1 SBU
First, allow building with system Glslang-15.0.0 and SPIRV-Tools-1.3.296.0:
sed '/build-version/d' -i glslc/CMakeLists.txt && sed '/third_party/d' -i CMakeLists.txt && sed 's|SPIRV|glslang/&|' -i libshaderc_util/src/compiler.cc && echo '"2024.3"' > glslc/src/build-version.inc
Now install glslc by running the following commands:
mkdir build && cd build && cmake -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_BUILD_TYPE=Release \ -D SHADERC_SKIP_TESTS=ON \ -G Ninja .. ninja
Now, as the root
user:
install -vm755 glslc/glslc /usr/bin