Looks like the fix backported from bug 841518 alone is not enough for this version. In contrast to 13.0.0, its CMakeLists.txt does not (yet) contain the option to circumvent automagical ccache detection. Log fragment and patches will be attached.
Created attachment 777860 [details, diff] CMakeLists.txt patch for CCACHE_ALLOWED option
Created attachment 777863 [details, diff] ebuild patch to pull in the CMakeLists.txt patch
I get an 500 Internal Server Error trying to attach the build log (it's truncated, I hit Strg-C when I saw it barfing about ccache). Here's a relevant snippet: ... -- Found LLVM: 12.0.1 -- Found ccache: /usr/bin/ccache -- <<< Gentoo configuration >>> Build type RelWithDebInfo Install path /usr/lib/llvm/12 Compiler flags: C -march=skylake -mtune=skylake -O2 -pipe -momit-leaf-frame-pointer -fPIC -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections C++ -march=skylake -mtune=skylake -O2 -pipe -momit-leaf-frame-pointer -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections Linker flags: Executable -Wl,-O1 -Wl,--as-needed Module -Wl,-O1 -Wl,--as-needed -Wl,-z,nodelete Shared -Wl,-O1 -Wl,--as-needed -Wl,-z,defs -Wl,-z,nodelete -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: CCACHE_ALLOWED -- Build files have been written to: /var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0_build >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0 ... * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0" * Build directory (BUILD_DIR): "/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0_build" ninja -v -j9 -l6 * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache * ACCESS DENIED: utimes: /var/cache/ccache [1/39] ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm/12/include -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/include -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV/libSPIRV -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV/Mangler -march=skylake -mtune=skylake -O2 -pipe -momit-leaf-frame-pointer -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fPIC -fno-exceptions -fno-rtti -std=gnu++14 -MD -MT lib/SPIRV/CMakeFiles/LLVMSPIRVLib.dir/Mangler/ManglingUtils.cpp.o -MF lib/SPIRV/CMakeFiles/LLVMSPIRVLib.dir/Mangler/ManglingUtils.cpp.o.d -o lib/SPIRV/CMakeFiles/LLVMSPIRVLib.dir/Mangler/ManglingUtils.cpp.o -c /var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV/Mangler/ManglingUtils.cpp * ACCESS DENIED: utimes: /var/cache/ccache [2/39] ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm/12/include -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/include -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV/libSPIRV -I/var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV/Mangler -march=skylake -mtune=skylake -O2 -pipe -momit-leaf-frame-pointer -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fPIC -fno-exceptions -fno-rtti -std=gnu++14 -MD -MT lib/SPIRV/CMakeFiles/LLVMSPIRVLib.dir/Mangler/FunctionDescriptor.cpp.o -MF lib/SPIRV/CMakeFiles/LLVMSPIRVLib.dir/Mangler/FunctionDescriptor.cpp.o.d -o lib/SPIRV/CMakeFiles/LLVMSPIRVLib.dir/Mangler/FunctionDescriptor.cpp.o -c /var/tmp/portage/dev-util/spirv-llvm-translator-12.0.0/work/SPIRV-LLVM-Translator-12.0.0/lib/SPIRV/Mangler/FunctionDescriptor.cpp * ACCESS DENIED: utimes: /var/cache/ccache ...
Closing, as 12.x does not exist anymore in tree.