| Issue |
177499
|
| Summary |
[SystemZ] lld datalayout problem
|
| Labels |
lld
|
| Assignees |
|
| Reporter |
JonPsson1
|
It seems that after adding the SP alignment to datalayout recently, I now see an error on my machine with compiler-rt tests: Profile-s390x :: instrprof-gc-sections.c. If I revert the change, the error goes away.
I am a bit new to using lld and even though I have not enabled it as a project with cmake, it seems to get built, which I didn't expect. I suppose it must be built for compiler-rt automatically somehow.
Any idea where the datalayout string lld is using could be fixed? @nikic @uweigand
```
/bin/clang -fuse-ld=lld -flto -o ./instrprof-gc-sections.c.tmp.lto /home/ijonpan/llvm-project/compiler-rt/test/profile/instrprof-gc-sections.c
ld.lld: llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:242: void llvm::MachineFunction::init(): Assertion `Target.isCompatibleDataLayout(getDataLayout()) && "Can't create a MachineFunction using a Module with a " "Target-incompatible DataLayout attached\n"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0
#8 0x000000000540c66a llvm::MachineFunction::init() (/home/ijonpan/llvm-project/build/bin/ld.lld+0x540c66a)
#9 0x000000000540ccea llvm::MachineFunction::MachineFunction(llvm::Function&, llvm::TargetMachine const&, llvm::TargetSubtargetInfo const&, llvm::MCContext&, unsigned int) (/home/ijonpan/llvm-proje
ct/build/bin/ld.lld+0x540ccea)
#10 0x0000000005462542 llvm::MachineModuleInfo::getOrCreateMachineFunction(llvm::Function&) (/home/ijonpan/llvm-project/build/bin/ld.lld+0x5462542)
#11 0x000000000540ef32 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/ijonpan/llvm-project/build/bin/ld.lld+0x540ef32)
#12 0x0000000007ade6ee llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/ijonpan/llvm-project/build/bin/ld.lld+0x7ade6ee)
#13 0x0000000007adeb4c llvm::FPPassManager::runOnModule(llvm::Module&) (/home/ijonpan/llvm-project/build/bin/ld.lld+0x7adeb4c)
#14 0x0000000007adf5b0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/ijonpan/llvm-project/build/bin/ld.lld+0x7adf5b0)
#15 0x000000000458bf10 codegen(llvm::lto::Config const&, llvm::TargetMachine*, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (uns
igned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex const&) LTOBackend.cpp:0:0
#16 0x000000000458ded0 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int,
llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/ijonpan/llvm-project/build/bin/ld.lld+0x458ded0)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs