Open rsclifford opened 5 years ago
Ah yes, it looks like a Rust package with some C++ parts. Since Rust is built on LLVM, it makes sense why this is unable to link with LTO. I'll see if it builds with Clang.
Indeed, it builds with Clang and ThinLTO. I'm going to leave this issue open as I think it's about time we start considering per-package Clang workarounds for Rust. As it stands, GCC and LLVM can't LTO across each others boundaries since they use fundamentally different IRs, so for packages that mix languages it's probably best to keep it all to the same compiler framework.
Quick hack for now, in case anyone wants to test:
net-news/newsboat CC=clang CXX=clang++ USE_NONGNU=1 *FLAGS-="-malign-data*" *FLAGS+="-flto=thin" RUSTFLAGS="-C codegen-units=${NTHREADS} -Z thinlto"
Quick hack for now, in case anyone wants to test:
net-news/newsboat CC=clang CXX=clang++ USE_NONGNU=1 *FLAGS-="-malign-data*" *FLAGS+="-flto=thin" RUSTFLAGS="-C codegen-units=${NTHREADS} -Z thinlto"
There's increasing amount of Rust/Clang stuff appearing [also Go, ( eww... ) and had case of Elixir], for now per package workaround isn't too much of a hassle, but fixing it globally is inevitable
This issue should be closed, -ffat-lto-objects is no longer needed to link newsboat.
Previous versions of newsboat have built just fine with GentooLTO's optimizations, but 2.16.1 fails to link. Adding
>=net-news/newsboat-2.16.1 *FLAGS+=-ffat-lto-objects
toltoworkarounds.conf
makes it build.My emerge-info.txt
The build log (without -ffat-lto-objects)