You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
staticlib with lto=fat now includes compiler_builtins as llvm bitcode after rustup update #146145
In HarfBuzz we use cargo to build a staticlib, then link it to harfbuzz using meson. We use lto="fat" and that's essential to the performance of the generated rust code binary.
This used to work with gcc as the final linker with rustc 1.91.0-nightly (898aff7 2025-08-14), but after updating to rustc 1.91.0-nightly (51ff895 2025-09-02), now the generated libharfbuzz_rust.a includes: a harfbuzz_rust .o file that is an ELF binary, but also a compiler_builtins .o that is in LLVM IR bitcode. This makes the gcc linker fail linking with unknown file format error. Is this intentional?
Does using lld together with a nightly rustc from before this regression also regress performance? Aka is the performance regression from using lld or from compiler-builtins participating in LTO.
My bad. I was measuring with different codegen-units. Setting codegen-units=1 I see the same performance with all scenarios.
Activity
Noratrieb commentedon Sep 3, 2025
likely regressed in #145368, there's already been another issue about that PR #146109 @rcvalle @dianqk
lqd commentedon Sep 3, 2025
If so, this should be fixed soon by the revert #146133
apiraino commentedon Sep 3, 2025
Assigning priority (discussion on Zulip).
@rustbot label -I-prioritize +P-critical
behdad commentedon Sep 3, 2025
Note that even trying to do the final link with
lldfails, with:bjorn3 commentedon Sep 3, 2025
Is that the system lld or the rust-lld shipped with rustc? The system lld likely uses a too old LLVM version.
4 remaining items
behdad commentedon Sep 3, 2025
My bad. I was measuring with different codegen-units. Setting codegen-units=1 I see the same performance with all scenarios.
rcvalle commentedon Sep 3, 2025
@rustbot claim
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
rcvalle commentedon Sep 4, 2025
Fixed in #146133.
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of rust-lang#146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of rust-lang#146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3
Auto merge of #146133 - rcvalle:rust-cfi-fix-145981, r=bjorn3