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.
下载地址(HTTP):https://github.com/google/shaderc/archive/v2026.2/shaderc-2026.2.tar.gz
MD5 校验和:3a6c42c237a3a6f40f076c7ee366ec29
大小:224 KB
预计所需磁盘空间:3.8 MB
预计构建时间:小于 0.1 SBU
First, allow building with system Glslang-16.3.0 and SPIRV-Tools-1.4.350.1:
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 '"2026.2"' > 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 glslc/glslc
Now, as the root user:
install -vm755 glslc/glslc /usr/bin