This is impacting rust-bin and thus many things that might use rust.
LLVM version used by Rust (14) does not match with ld.lld version (13)
Currently our dev-lang/rust-bin is built with a newer version of LLVM, specifically the 14 major release, which prevents using Link Time Optimizations for Rust and LLVM compiled software using Funtoo's current available version of LLVM.
I encountered this error when tying to use LTO on the latest www-client/firefox:
* Using LLVM slot 13 to build * Rust is using LLVM version 14 but ld.lld version belongs to LLVM version 13. * You will be unable to link www-client/firefox. To proceed you have the following options: * - Manually switch rust version using 'eselect rust' to match used LLVM version * - Switch to dev-lang/rust[system-llvm] which will guarantee matching version * - Build www-client/firefox without USE=lto * - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole * llvm/clang/lld/rust chain depending on your @world updates) * ERROR: www-client/firefox-101.0.1::browser-kit failed (setup phase): * LLVM version used by Rust (14) does not match with ld.lld version (13)!
To mitigate this matching the compiler and linkers should fix this. This is partially compounded by the fact we autogen dev-lang/rust-bin and not LLVM, so rust-bin drifts ahead of our LLVM version as new versions of rust-bin are released.
This is a request to track adding the latest LLVM 14 release to llvm-kit so rust-bin and LLVM are in sync and LTO compilations work for packages like firefox.