How is rustc's behavior different with linker-plugin-lto and how can I observe what it is doing?

When I use -Clinker-plugin-lto -Clinker=clang-17 -Clink-arg=-fuse-ld=lld, everything works as normal, but non-Rust code doesn't get inlined or ellided. LTO for pure Rust works when I use the -Cembed-bitcode -Clto=fat, but I iiuc the those settings shouldn't matter with Clinker-plugin-lto.

I don't know what to expect, but I'd assume if it is working some very small non-Rust functions would get inlined. I made sure to compile test it with main of a binary crate. I have been using cargo-show-asm to view the output, but I don't know if this might be bypassing the linker.

I think this would be easier to diagnose if I could see what it was doing step-by-step. Is there anyway I can do this?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.