I recently opened an issue on firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1644409) about the use of -Clto (which is lto=fat) for build gkrust component, instead of the use of lto=thin which is advertized by cargo documentation as "takes substantially less time to run while still achieving performance gains similar to "fat". "
from testing, it seems that the use of lto=thin generate bunch of compilation and runtime failures: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ec46beabce7d1e586253e59de66df642e4a50f4
does someone has some elements about these lto=thin failures ?
as firefox build heavy uses sccache, I wonder if it could be implied. but I have unsure.
where could I find the specific code for lto ? is it a rust code or a LLVM code ?
LTO itself is an LLVM thing. The driver code at the rustc side is at https://github.com/rust-lang/rust/blob/228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2/src/librustc_codegen_llvm/back/lto.rs and https://github.com/rust-lang/rust/blob/228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2/src/librustc_codegen_ssa/back/lto.rs.