If using app-alternatives/ninja[-reference,samurai], and so samurai symlinked to /usr/bin/ninja, swift fails to compile. See the logs. I opened this bug report as requested in one of the latest comments in this bug report: https://bugs.gentoo.org/950708 Reproducible: Always
Created attachment 920380 [details] build.log
As I recommend in the previous bug report: If doable, any ebuild related to swift should use /usr/bin/ninja-reference (providen by dev-build/ninja) instead of /usr/bin/ninja (providen by app-alternatives/ninja). I should add that it, if doable and not overly complicated, it would be better to find a way to fix building swift with samurai.
I finally got dev-lang/swift-5.10.1-r4 build with samurai instead of ninja, but only on my ARM64 workstation. On all my AMD64 PCs, it is still failing if samurai is used instead of ninja.
dev-lang/swift-6.0.3-r1::guru also got build correctly on arm64 with app-alternatives/ninja[-reference samurai] but not on amd64.