[llvm-dev] Linking LLVM IR with standard library

mats petersson via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 18 08:09:51 PST 2016


Without reproducible steps, it's hard to give meaningful advice. In my
experience, linking using `clang` (or `gcc`) will work.

My compiler does that around in this function:
https://github.com/Leporacanthicus/lacsap/blob/master/binary.cpp#L126

--
Mats

On 18 November 2016 at 11:20, Shilpa B via llvm-dev <llvm-dev at lists.llvm.org
> wrote:

> Hi,
>
> 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.
>
> I compiled the .ll file to .o using clang. However, when I execute the .o
> file all generated numbers are zeros.
>
> How should I link the .ll file with the standard library for the clang to
> generate the random numbers?
>
>
> Thanks
> -Shilpa
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161118/e837efc6/attachment.html>


More information about the llvm-dev mailing list