Bug#662742: clang: files compiled with "-flto" fail to link
Sylvestre Ledru
sylvestre at debian.org
Thu Mar 15 22:05:56 UTC 2012
Hello Miles,
Le mardi 06 mars 2012 à 15:24 +0900, Miles Bader a écrit :
> Is there supposed to be a special linker that handles LLVM bitcode?
After digging on this, here is the right way:
echo 'int main () { return 0; }' > foo.cc
clang++ -c -flto -O2 foo.cc -o foo.o
clang++ -flto -use-gold-plugin -O2 foo.o -o foo
I added the -use-gold-plugin arg. You will need llvm-dev version 3.0-9
and binutils-gold.
I will ping upstream to ask if they recommend a strong dependency on ld
gold and a default usage of -use-gold-plugin.
Thanks for spotting that and the easy test case (I love easy and lazy
test case).
Sylvestre
More information about the Pkg-llvm-team
mailing list