I thought it would, but it seems to be missing the CloneModule symbol (which isn't called from anywhere in the LLVM codebase).<br><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 7:43 AM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu">criswell@illinois.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
On 7/14/11 7:36 PM, Gregory Malecha wrote:
<blockquote type="cite">
Hello,<br>
<br>
I have a question about how to set up a Makefile that generate a
.so that I can load into opt without getting duplicate symbols.
Here's what I have right now:<br>
</blockquote>
<br></div>
Have you tried removing LINK_COMPONENTS below? I suspect that the
opt binary already contains everying in the transformUtils library.<br>
<br>
-- John T.<br>
<br>
<blockquote type="cite"><div class="im"><br>
<span style="font-family:courier new,monospace">LIBRARYNAME=previrt</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">SHARED_LIBRARY=previrt</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"></span><span style="font-family:courier new,monospace">LINK_COMPONENTS :=
transformUtils</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">LINK_LIBS_IN_SHARED=1</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">include
$(LEVEL)/Makefile.common</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">LIBS +=
-lprotobuf</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">CPPFLAGS +=
-I${HOME}/.root/usr/include -DGOOGLE_PROTOBUF_NO_RTTI</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">LDFLAGS +=
-Wl,-L${HOME}/.root/usr/lib/</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">PROTOC=${HOME}/.root/usr/bin/protoc</span><br>
<br>
I'm pretty sure the problem comes from LINK_LIBS_IN_SHARED, but my
code depends on the google protobuf library so I need to link
against that otherwise I get undefined symbols.<br>
<br>
Does anyone know how to solve this problem with LLVM makefiles?<br>
<br>
Thank you.<br clear="all">
<br>
-- <br>
gregory malecha<br>
<div><a href="http://www.people.fas.harvard.edu/%7Egmalecha/" target="_blank">http://www.people.fas.harvard.edu/~gmalecha/</a></div>
<br>
<br>
<fieldset></fieldset>
<br>
</div><pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>gregory malecha<br><div><a href="http://www.people.fas.harvard.edu/~gmalecha/" target="_blank">http://www.people.fas.harvard.edu/~gmalecha/</a></div><br>