<div dir="ltr"><div>Without reproducible steps, it's hard to give meaningful advice. In my experience, linking using `clang` (or `gcc`) will work.<br><br></div><div>My compiler does that around in this function:<br><a href="https://github.com/Leporacanthicus/lacsap/blob/master/binary.cpp#L126">https://github.com/Leporacanthicus/lacsap/blob/master/binary.cpp#L126</a><br></div><div><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 November 2016 at 11:20, Shilpa B via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have a LLVM IR file generated for a different source language (Not C). I have added a rand() function in it to generate random numbers.</div><div><br></div><div>I compiled the .ll file to .o using clang. However, when I execute the .o file all generated numbers are zeros. </div><div><br></div><div>How should I link the .ll file with the standard library for the clang to generate the random numbers?</div><div><br></div><div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>-Shilpa</div></font></span></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>