But don't apply comdat groups when loading the LTO object files.
This is basically the same logic used by the ELF linker.
Details
- Reviewers
ruiu - Commits
- rZORG85b9ac9309e9: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
rZORG627c3813521e: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
rG85b9ac9309e9: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
rG627c3813521e: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
rLLD360782: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
rG697f2149f1c5: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
rL360782: [WebAssembly] LTO: Honor comdat groups when loading bitcode files
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 31908 Build 31907: arc lint + arc unit
Event Timeline
Even though what this code does is the same as what we do for the ELF linker, the code looks different. In ELF, we pass ComdatGroups (which is a set of comdat signature strings we've seen so far) around. I don't remember if there was a reason to do it differently for Wasm. Do you remmeber?
I found this version more explicit. ELF currently passes a new DummyGroups to each LTO object's parse function as way of implicitly disabling comdats, but I think explicitly disabling them improves clarity. Perhaps I should change the ELF linker to do the same thing either in this change or as a followup? Alternaitvely I would update this PR to match the ELF method and propose a separate PR to convert them both over as a followup?
LGTM
Yeah, maybe we should change ELF to match this, but it will likely to conflict with my ongoing refactoring, I'll take a look later about that.