authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-12-12 02:14:06+01:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-12-13 00:40:35+01:00
log078a64f8d9b50ad99afe12ba3038afc3e68f507c
tree4a587fddc47a8a4c4b9d113a6ff82e1907107039
parent307d98dc35354c6562bb0c12cc79710f6b8a4c01
signaturelock-open Commit is signed but in an unrecognized format.

std.CrossTarget: add isNativeAbi()


1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/zig/cross_target.zig+5-1
......@@ -500,8 +500,12 @@ pub const CrossTarget = struct {
500500 self.dynamic_linker.get() == null and self.glibc_version == null;
501501 }
502502
503 pub fn isNativeAbi(self: CrossTarget) bool {
504 return self.os_tag == null and self.abi == null;
505 }
506
503507 pub fn isNative(self: CrossTarget) bool {
504 return self.isNativeCpu() and self.isNativeOs() and self.abi == null;
508 return self.isNativeCpu() and self.isNativeOs() and self.isNativeAbi();
505509 }
506510
507511 pub fn zigTriple(self: CrossTarget, allocator: *mem.Allocator) error{OutOfMemory}![]u8 {