[llvm-dev] ld.lld: error: Invalid record (original) (raw)

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Sat May 23 10:54:44 PDT 2020


On 2020-05-22, Marc via llvm-dev wrote:

Hi,

I am using LTO and a compile pass to make changes to a target. So far that compile pass worked fine on many larger code projects, however on a specific large target something seems to get wrong and lld is not very helpful in the output: ld.lld: /usr/lib/gcc/x8664-linux-gnu/10/../../../x8664-linux-gnu/crt1.o ld.lld: /tmp/jasper-73de9f.o ld.lld: src/libjasper/.libs/libjasper.a [lots more libraries] ld.lld: error: Invalid record (Producer: 'LLVM11.0.0git' Reader: 'LLVM 11.0.0git') How can I find out which LLVM-IR entry in /tmp/jasper-73de9f.o is resulting in that problem? Thank you! Regards, Marc

The diagnostic may come from one of 224 instances of return error("Invalid record") in lib/Bitcode/Reader/{BitcodeReader,MetadataLoader}.cpp I think you need a -DCMAKE_BUILD_TYPE=Build build and locate the exact place by setting a breakpoing on BitcodeReaderBase::error



More information about the llvm-dev mailing list