[NFC] WebAssembly build break #2
ClosedPublic

Authored by jfb on Wed, May 16, 3:31 PM.

Details

Summary

Same as r332530, move WasmSymbol::dump to an implementation file to avoid linker
issues when the dump function is seen in the header, doesn't get eliminated, and
then linking fails because of the missing dependency.

rdar://problem/40258137

Diff Detail

Repository
rL LLVM
jfb created this revision.Wed, May 16, 3:31 PM
vsk accepted this revision.Wed, May 16, 3:33 PM

LGTM, I've confirmed this fixes my local modules build.

This revision is now accepted and ready to land.Wed, May 16, 3:33 PM
Closed by commit rL332542: [NFC] WebAssembly build break #2 (authored by jfb, committed by ). · Explain WhyWed, May 16, 3:35 PM
This revision was automatically updated to reflect the committed changes.

Why does this work? Doesn't LLVM_DUMP_METHOD force this method into the link regardless? I though that was the point of it.. so it would never be eliminated.

vsk added a comment.Wed, May 16, 3:40 PM

IIUC the dump method is still available via libObject, which should be sufficient?

jfb added a comment.EditedWed, May 16, 3:46 PM

Why does this work? Doesn't LLVM_DUMP_METHOD force this method into the link regardless? I though that was the point of it.. so it would never be eliminated.

I may be misunderstanding: I thought this was here for lldb's usage purpose (or any debugger, so you can dump while debugging), so if it gets generated then it cannot get eliminated even if unused. If you only see the header you only have a forward declaration, so there's nothing that could be eliminated anyways.