mirror of
https://github.com/ziglang/zig.git
synced 2024-12-04 02:48:50 +00:00
std.Target: Remove isBpfFreestanding().
The only use of this has nothing to do with the OS tag.
This commit is contained in:
parent
140fb615a6
commit
55fe86c57e
@ -1754,10 +1754,6 @@ pub inline fn isBSD(target: Target) bool {
|
||||
return target.os.tag.isBSD();
|
||||
}
|
||||
|
||||
pub inline fn isBpfFreestanding(target: Target) bool {
|
||||
return target.cpu.arch.isBpf() and target.os.tag == .freestanding;
|
||||
}
|
||||
|
||||
pub inline fn isGnuLibC(target: Target) bool {
|
||||
return target.os.tag.isGnuLibC(target.abi);
|
||||
}
|
||||
|
@ -2045,9 +2045,7 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s
|
||||
// copy when generating relocatables. Normally, we would expect `lld -r` to work.
|
||||
// However, because LLD wants to resolve BPF relocations which it shouldn't, it fails
|
||||
// before even generating the relocatable.
|
||||
if (output_mode == .Obj and
|
||||
(comp.config.lto or target.isBpfFreestanding()))
|
||||
{
|
||||
if (output_mode == .Obj and (comp.config.lto or target.cpu.arch.isBpf())) {
|
||||
// In this case we must do a simple file copy
|
||||
// here. TODO: think carefully about how we can avoid this redundant operation when doing
|
||||
// build-obj. See also the corresponding TODO in linkAsArchive.
|
||||
|
Loading…
Reference in New Issue
Block a user