The upstream llvm has started to restrict the CMAKE_BUILD_TYPE variable value. Since Gentoo uses a custom build type (Gentoo) it no longer configures properly. Reproducible: Always
Created attachment 408652 [details, diff] A patch that fixes the build Attached is a patch that disables this behaviour altogether. I think such a resolution of this problem is the best, since this restriction doesn't bring anything to the portage build system.
Created attachment 408774 [details, diff] Equivalent patch against 624a11dc4f96e2ab9b8ca230fd230e2de69ffe48
Commit 8179d06019a28c0e9febedf349864c918467ebca has been reverted by ece40fd6d5a7a2422305d0dba4af814fe6e2e9b6; Bigos' patch is now authoritative again.
Commit e7e85970eb416ae6b07e09229ca44a16b204b017 re-applied 8179d06019a28c0e9febedf349864c918467ebca. Above patch now works better :-/. Aaaaaaa.
Created attachment 408886 [details, diff] Updated patch The above patches does not apply anymore. Attaching updated patch.
Why don't you upstream it in Gentoo?
Hm, I'm not sure about all consequences, but I made the build work by using "CMAKE_BUILD_TYPE=Release" (which I put before "cmake-utils_src_configure" in the ebuild). At least mesa built afterwards. Is there a benefit in using a custom build type ?
The benefit of custom build type is that it will then use make.conf variables (like CFLAGS). Without it, the CMake build system will use its defaults (like "-O2 -DNDEBUG" for Release, IIRC).
Thanks everyone Not sure how this will evolve, but in the meantime I added the patch that strips this check.