This is an archive of the discontinued LLVM Phabricator instance.

[NFC] WebAssembly build break #2
ClosedPublic

Authored by jfb on May 16 2018, 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

Event Timeline

jfb created this revision.May 16 2018, 3:31 PM
vsk accepted this revision.May 16 2018, 3:33 PM

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

This revision is now accepted and ready to land.May 16 2018, 3:33 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.May 16 2018, 3:40 PM

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

jfb added a comment.EditedMay 16 2018, 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.