[LLVMdev] gold and debug information

Devang Patel devang.patel at gmail.com
Tue Jul 20 10:39:02 PDT 2010

On Tue, Jul 20, 2010 at 6:49 AM, Rafael Espindola <espindola at google.com> wrote:
>> export CC="llvm-gcc -use-gold-plugin -Wl,-plugin-opt=also-emit-llvm"
>> export CXX="llvm-g++ -use-gold-plugin -Wl,-plugin-opt=also-emit-llvm"
>> export RANLIB=/bin/true
>> export CFLAGS="-O4 -g"
>> then configure, make, and then hit the error.
>> The error only happens if the CFLAGS has -g in it.
> Can you reduce the testcase a bit? It would be a lot easier to
> reproduce with the ld invocation and the .o files given to it.

This (Unknown constant! in bitcode writer when -g is used) is a known
bug in CloneModule, because it is not cloning MDNodes appropriately.
So bug point is likely to run into this while reducing test case.

I do not know whether gold is cloning module at -O4 or not.

More information about the llvm-dev mailing list