[lld] [lld][WebAssembly] Match the ELF linker in transitioning away from archive indexes. (PR #78658)

Alex Crichton via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 13:49:22 PST 2024


alexcrichton wrote:

> when a file is referenced (i.e. pulled in from the archive) the custom section is included? 

Can confirm what @dschuff said as well. We rely on that behavior as well for the component model to smuggle component type information at the Rust source level through LLVM out to the final binary to get slurped up by the component tooling. (that's totally unrelated to everything said on this so far but if you're curious that's a case we found for it)

I've got a PR for rustc now -- https://github.com/rust-lang/rust/pull/120588 -- to use the wasm object file format for rustc's metadata. It also needed an empty `linking` section to appease `wasm-ld`, but I've confirmed that when using a tip-of-tree `wasm-ld` that no warnings are emitted and no compiler-generated-metadata makes its way into the final artifact.

https://github.com/llvm/llvm-project/pull/78658


More information about the llvm-commits mailing list