| ... | @@ -1663,7 +1663,18 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s | ... | @@ -1663,7 +1663,18 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 1663 | // copy when generating relocatables. Normally, we would expect `lld -r` to work. | 1663 | // copy when generating relocatables. Normally, we would expect `lld -r` to work. |
| 1664 | // However, because LLD wants to resolve BPF relocations which it shouldn't, it fails | 1664 | // However, because LLD wants to resolve BPF relocations which it shouldn't, it fails |
| 1665 | // before even generating the relocatable. | 1665 | // before even generating the relocatable. |
| 1666 | if (output_mode == .Obj and (comp.config.lto != .none or target.cpu.arch.isBpf())) { | 1666 | // |
| | 1667 | // For m68k, we go through this path because LLD doesn't support it yet, but LLVM can |
| | 1668 | // produce usable object files. |
| | 1669 | if (output_mode == .Obj and |
| | 1670 | (comp.config.lto != .none or |
| | 1671 | target.cpu.arch.isBpf() or |
| | 1672 | target.cpu.arch == .lanai or |
| | 1673 | target.cpu.arch == .m68k or |
| | 1674 | target.cpu.arch.isSPARC() or |
| | 1675 | target.cpu.arch == .ve or |
| | 1676 | target.cpu.arch == .xcore)) |
| | 1677 | { |
| 1667 | // In this case we must do a simple file copy | 1678 | // In this case we must do a simple file copy |
| 1668 | // here. TODO: think carefully about how we can avoid this redundant operation when doing | 1679 | // here. TODO: think carefully about how we can avoid this redundant operation when doing |
| 1669 | // build-obj. See also the corresponding TODO in linkAsArchive. | 1680 | // build-obj. See also the corresponding TODO in linkAsArchive. |