| author | |
| committer | |
| log | 55fe86c57e5a069c0de56ff1ef2adfc80aa0ece7 |
| tree | 4a4600b3924877f5081c2956489c0c59cf752785 |
| parent | 140fb615a6a351fb397d6a538a4954a2229e90a8 |
| signature |
The only use of this has nothing to do with the OS tag.2 files changed, 1 insertions(+), 7 deletions(-)
lib/std/Target.zig-4| ... | ... | @@ -1754,10 +1754,6 @@ pub inline fn isBSD(target: Target) bool { |
| 1754 | 1754 | return target.os.tag.isBSD(); |
| 1755 | 1755 | } |
| 1756 | 1756 | |
| 1757 | pub inline fn isBpfFreestanding(target: Target) bool { | |
| 1758 | return target.cpu.arch.isBpf() and target.os.tag == .freestanding; | |
| 1759 | } | |
| 1760 | ||
| 1761 | 1757 | pub inline fn isGnuLibC(target: Target) bool { |
| 1762 | 1758 | return target.os.tag.isGnuLibC(target.abi); |
| 1763 | 1759 | } |
src/link/Elf.zig+1-3| ... | ... | @@ -2045,9 +2045,7 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 2045 | 2045 | // copy when generating relocatables. Normally, we would expect `lld -r` to work. |
| 2046 | 2046 | // However, because LLD wants to resolve BPF relocations which it shouldn't, it fails |
| 2047 | 2047 | // before even generating the relocatable. |
| 2048 | if (output_mode == .Obj and | |
| 2049 | (comp.config.lto or target.isBpfFreestanding())) | |
| 2050 | { | |
| 2048 | if (output_mode == .Obj and (comp.config.lto or target.cpu.arch.isBpf())) { | |
| 2051 | 2049 | // In this case we must do a simple file copy |
| 2052 | 2050 | // here. TODO: think carefully about how we can avoid this redundant operation when doing |
| 2053 | 2051 | // build-obj. See also the corresponding TODO in linkAsArchive. |