authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 21:09:32-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 21:09:32-05:00
log3b235cfa807451ee17067ae8a34596b88bbc2eaf
treefb255aa5d6af551df6b50670f32cc27c3d3a0682
parentf6f0b019bee7910702e113be6d33865c592afa2a
signaturelock-open Commit is signed but in an unrecognized format.

std.zig.CrossTarget: fix compile errors

closes #4620

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

lib/std/zig/cross_target.zig+5-3
......@@ -355,8 +355,10 @@ pub const CrossTarget = struct {
355355 }
356356
357357 pub fn getCpuModel(self: CrossTarget) *const Target.Cpu.Model {
358 if (self.cpu_model) |cpu_model| return cpu_model;
359 return self.getCpu().model;
358 return switch (self.cpu_model) {
359 .explicit => |cpu_model| cpu_model,
360 else => self.getCpu().model,
361 };
360362 }
361363
362364 pub fn getCpuFeatures(self: CrossTarget) Target.Cpu.Feature.Set {
......@@ -645,7 +647,7 @@ pub const CrossTarget = struct {
645647 self.glibc_version = SemVer{ .major = major, .minor = minor, .patch = patch };
646648 }
647649
648 pub fn getObjectFormat(self: CrossTarget) ObjectFormat {
650 pub fn getObjectFormat(self: CrossTarget) Target.ObjectFormat {
649651 return Target.getObjectFormatSimple(self.getOsTag(), self.getCpuArch());
650652 }
651653