<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">It’s very similar to the issue described in <a href="http://lists.llvm.org/pipermail/llvm-dev/2016-February/095671.html" class="">http://lists.llvm.org/pipermail/llvm-dev/2016-February/095671.html</a><div class="">My code has RTTI and LLVM doesn’t. During static linking, it hits the “undefined type info” error. After I put the anchors, the issues are solved. My guess the weak vtable and the mixed RTTI/no-RTTI confused the linker somehow. I don’t know the exact reason though.</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 15, 2018, at 7:55 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Apr 14, 2018 at 10:33 PM Weiming Zhao via Phabricator <<a href="mailto:reviews@reviews.llvm.org" class="">reviews@reviews.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">weimingz added a comment.<br class=""><br class="">In<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D45244#1064905" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D45244#1064905</a>, @dblaikie wrote:<br class=""><br class="">> Great - thanks for sticking with it, sorry for my dodgy explanations!<br class="">><br class="">> If you're adding in anchors, are you using -Wweak-vtables to find them? If you're pushing through to make LLVM (& hopefully Clang/other LLVM subprojects) -Wweak-vtables clean, perhaps you can turn on the warning in the CMake config once it's clean so we don't regress this again? (it'd also be interesting to do some kind of analysis to see whether avoiding weak vtables is /actually/ worthwhile - like maybe making a temporary/local/non-committed change to change all the explicit anchors into inline functions (unanchoring them) & see if builds are much larger or longer, etc)<br class=""><br class=""><br class="">I got linker error when my code tries to statically link against some LLVM libs (like libLLVMOrc). It's a good idea to turn on -Wweak-vtables to check if we miss other cases. I will try it. Thanks<br class=""></blockquote><div class=""><br class="">Hmm, I'm confused - you mean without these changes you were getting link errors due to vtable symbols for types with weak vtables? I'm not sure why that would be - your code should've been built with its own weak vtable, in that situation.<br class=""><br class="">- Dave<br class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><br class=""><br class="">Repository:<br class=""> <span class="Apple-converted-space"> </span>rL LLVM<br class=""><br class=""><a href="https://reviews.llvm.org/D45244" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D45244</a></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>