[LLVMdev] Migrate Project Build system to LLVM BitCode

Hassan, Ahmad ahmad.hassan at sap.com
Thu Jan 17 07:09:09 PST 2013


Hi Duncan,

> 4.gcc -g -O2 -o .libs/mergedexe  .libs/mergedbc.s  -pthread
> -Wl,--export-dynamic   .libs/lib1.a   -lssl -lcrypto -ldl -pthread .libs/lib2.so

>if you pass -O4 rather than -O2 to clang I think it will in essence do this all
>for you already.  It might even do the link time optimization for you at -O2
>even, I'm not sure.

No, if I use clang for producing executable then I get series of error both with O2 and O4:

error: input can't have .file dwarf directives when -g is used to generate dwarf debug info for assembly code
        .file   38 "/usr/include/x86_64-linux-gnu/sys/un.h"

If I remove '-g' then I get
/usr/bin/ld: /usr/local/bin/../lib/LLVMgold.so: error loading plugin
/usr/bin/ld: /usr/local/bin/../lib/LLVMgold.so: error in plugin cleanup (ignored)
clang: error: linker command failed with exit code 1

It works fine if I use 'gcc' in step 4 for produce executable.

Cheers,
Ahmad



Ciao, Duncan.

>
> Thanks.
>
> Ahmad
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list