std.Target: Add hurdTuple() and hurdTupleSimple() functions.
These serve the same purpose as the linuxTriple() and linuxTripleSimple() functions, i.e. to return a triple understood by the GNU ecosystem.
This commit is contained in:
@@ -2023,6 +2023,14 @@ pub fn zigTriple(target: Target, allocator: Allocator) Allocator.Error![]u8 {
|
||||
return Query.fromTarget(target).zigTriple(allocator);
|
||||
}
|
||||
|
||||
pub fn hurdTupleSimple(allocator: Allocator, arch: Cpu.Arch, abi: Abi) ![]u8 {
|
||||
return std.fmt.allocPrint(allocator, "{s}-{s}", .{ @tagName(arch), @tagName(abi) });
|
||||
}
|
||||
|
||||
pub fn hurdTuple(target: Target, allocator: Allocator) ![]u8 {
|
||||
return hurdTupleSimple(allocator, target.cpu.arch, target.abi);
|
||||
}
|
||||
|
||||
pub fn linuxTripleSimple(allocator: Allocator, arch: Cpu.Arch, os_tag: Os.Tag, abi: Abi) ![]u8 {
|
||||
return std.fmt.allocPrint(allocator, "{s}-{s}-{s}", .{ @tagName(arch), @tagName(os_tag), @tagName(abi) });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user