Displaying 20 results from an estimated 60000 matches similar to: "[LLVMdev] Linking a bc file"
2010 Nov 22
0
[LLVMdev] Linking a bc file
Hello Alexandre,
> I'm trying to test a bitcode file that I created using the LLVM API. Using llvm-g++, how can I compile.a C++ file and link it against my bc file ? I try to call a single function in the bc file from the c++ main function.
You need to have a linker which supports linking of LLVM bitcode. So
far this is darwin linker and gold with extra plugin. This doc might
be helpful:
2012 Jun 26
2
[LLVMdev] What's the difference between using llvm-link and using llvm gold plugin?
I got your point! Thanks a lot, Rafael!
Best,
Tianyin
On Tue, Jun 26, 2012 at 4:12 PM, Rafael Espíndola <
rafael.espindola at gmail.com> wrote:
> > Could you explain a bit more (sorry I'm not from a compiler background)?
> So,
> > what's the difference in the analysis perspective? What does "reading ELF
> > files and archives" and "creating a
2010 Oct 04
2
[LLVMdev] fPIC in llvm 2.6
It appears that llvm-ld can handle bitcode files but llvm-gcc complains
that when I pass bitcode files to it. I assume that means that llvm-gcc
does not use llvm-ld by default. Is there a way to force it to use llvm-ld?
Bill Wendling wrote:
> You do it by using the -flto flag. But you will need a linker that's able to handle the bitcode files. The Apple linker can and so can the
2011 Jun 15
2
[LLVMdev] Difficulties in using gold plugin. ("ar" not working properly)
Dear all,
I'm trying to use the gold plugin to make it easier to generate LLVM bitcode
from complex applications. I did the steps mentioned on
"http://llvm.org/docs/GoldPlugin.html". Both linking and LLVM generation seem to
work properly, however when using the tool ar, the symbol table is lost. "no
archive symbol table (run ranlib)".
I'm using LLVM 2.9, Ubuntu 10.10,
2014 Apr 07
4
[LLVMdev] LLVM 3.4 performance regressed?
Hi,
It was suggested that I post my question regarding a LLVM 3.4 performance
regression to this mailing list, rather than stackoverflow. So here is
the link:
https://stackoverflow.com/questions/22902034/llvm-3-4-performance-regressed
Thanks :)
Jens
--
Jens Tröger
http://savage.light-speed.de/
2012 Jun 27
0
[LLVMdev] What's the difference between using llvm-link and using llvm gold plugin?
Hi,
> I got your point! Thanks a lot, Rafael!
one big difference is that llvm-link doesn't do any optimization, while the gold
linker does. You can get something similar to gold by using llvm-link, and then
running "opt -std-link-opts" on the linked bitcode file. However all symbols
will be internalized by default (you can adjust this on the command line) while
the gold linker
2013 Jan 29
3
[LLVMdev] Dropped support for IR-level extended linking support (archives, etc.)
r172749 removed Linker/LinkArchives.cpp and Linker/LinkItems.cpp citing:
This code is dead, and the "right" way to get this support is to use the
platform-specific linker-integrated LTO mechanisms, or the forthcoming LLVM
linker.
Could someone please expand on what the "right way" is and these LTO mechanisms or where I can find further information? We used several
2009 Dec 04
2
[LLVMdev] linking a parser bitcode
Hello again,
My partner and I am modifying a PEG parser generator to produce LLVM bitcode from a version of a parsing expression grammar that takes LLVM Assembly as code. It accepts external libraries in its current state so we are writing an external library in C++ using C bindings for the linkage. Trying to get it to link is proving to be more challenging than expected. My partner is trying
2010 Mar 05
2
[LLVMdev] Compile a large project with llvm?
Dear John,
Thanks for your reply. I want to do whole program analysis, all what I
need are just the separate .bc files. What instructions should I follow?
I run the configure on apache in this way:
CC=clang CFLAGS=-emit-llvm ./configure
while I get the error message like:
checking for gcc... clang
checking for C compiler default output file name... configure: error: C
compiler cannot
2013 Jan 29
0
[LLVMdev] Dropped support for IR-level extended linking support (archives, etc.)
Hi Chris,
What functions were you using, and what features of them were you using? If
you just need to link individual bit codes together, you can do it in
exactly the same way that llvm-link does (using Linker::LinkModules).
If you really need features like being able to pull objects out of
archives, then you should use an LTO enabled linker (either the system
linker on OS X, or gold + the gold
2008 Sep 17
2
[LLVMdev] bc file only with llvm-gcc3?
question about:
http://llvm.org/docs/FAQ.html#translatec++
"With llvm-gcc3, this will generate program and program.bc."
Is this llvm-gcc3 only out of date of is it really only llvm-gcc3?
I have 'llvm-g++ (GCC) 4.2.1 (Based on Apple Inc. build 5546) (LLVM
build)' installed on Ubuntu and followed that guide and it creates
indeed no .bc file.
Regards,
-mr
2009 Sep 23
1
[LLVMdev] How to create shared library using llvm-ld
Hi, all.
I am using llvm-gcc to compile some softwares, and compile them with
CFLAGS="-emit-llvm" to gernerate bitcode IR. Then I have to replace normal
ld with llvm-ld.
Unfortunately, llvm-ld doesn't support -shared option which is used to
create a shared library. I've also noticed that llvm-ld supports an option
'-link-as-library' which is used to generate
2009 Oct 30
2
[LLVMdev] I have built a whole-program bitcode file for openldap-2.19
Hi,all
I have written a wrapper which includes gcc/g++,ld and llvm counterparts, it
invokes native or llvm compiler and linker according to the options it
receives,after I replace the native tools with my wrapper in libtool script,
I just typed like this
make CC=wrapper AC_CFLAGS=-emit-llvm
then I got a bc file of slapd and other tools in clients directory
The accessory is the whole-program
2009 Dec 23
2
[LLVMdev] Problem while compling SPEC2000 with llvm-gcc
Hi, all
I use llvm-gcc -O4 to compile SPEC 2000, some benchmarks can't be
built successfully, such as 164.gzip, 175.vpr etc.
The error messages are as follows.
..
zh.o unlzw.o unpack.o unzip.o util.o zip.o -o gzip
bits.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
specmake: *** [gzip] Error 1
specmake options 2> options.err |
2013 Jan 17
4
[LLVMdev] Migrate Project Build system to LLVM BitCode
Hi All,
I am migrating a build system of an existing project from 'Object files' based executable generation to 'LLVM Bitcode' files based exe generation and applying OPT pass to LLVM Bitcode. I found out the following 4 step procedure. Please let me know if this is the right procedure or is there any other easy way of doing it. I need to modify 'Makefile' accordingly. I
2010 Mar 05
3
[LLVMdev] Compile a large project with llvm?
Hi,
How to compile a large project (such as Apache) by using llvm-gcc?
I tried to replace CC with llvm-gcc and CFLAGS with -emit-llvm while
running configure, but it didn't work.
Thank you for your help.
-Wink
2008 Sep 17
0
[LLVMdev] bc file only with llvm-gcc3?
On Wed, Sep 17, 2008 at 1:31 PM, Michael Reichenbach
<michael_reichenbach at freenet.de> wrote:
> question about:
> http://llvm.org/docs/FAQ.html#translatec++
> "With llvm-gcc3, this will generate program and program.bc."
>
> Is this llvm-gcc3 only out of date of is it really only llvm-gcc3?
Those instructions are out of date; the current version of llvm-gcc
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
>
> but doesn't emit optnone and nounwind attributes
>
s/nounwind/noinline
On Mon, Jan 28, 2019 at 11:35 AM Jakub (Kuba) Kuderski <
kubakuderski at gmail.com> wrote:
> As far as I understand, gllvm doesn't run LTO pipeline or any cross-module
> optimization, and the optimization level provided is only used to compile
> each Translation Unit separately.
> If you
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
This works great.
> You can also try using the gllvm wrapper: https://github.com/SRI-CSL/gllvm ; it's quite reliable and easy to use in my experience.
Just to be sure. Only one version of bc file will be generated that
corresponds to the compiler options provide at configure?
The original approach using ld.gold will provide several .bc files
that correspond to different stages of the
2009 Dec 23
0
[LLVMdev] Problem while compling SPEC2000 with llvm-gcc
On 2009-12-23 08:22, Li Shengmei wrote:
>
> Hi, all
>
> I use llvm-gcc –O4 to compile SPEC 2000, some benchmarks
> can’t be built successfully, such as 164.gzip, 175.vpr etc.
>
> The error messages are as follows.
>
>
>
> ……
>
> zh.o unlzw.o unpack.o unzip.o util.o zip.o -o gzip
>
> bits.o: file not recognized: File format not recognized