authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-06 21:03:23-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-06 21:03:23-05:00
log80ff549e2602ecfc4eaf9ade0108e1779dff1874
tree3b89599d099095b509741277ed950737fe618f7c
parent54799ccaf819f6c6934327416f2f28587e40ffa7
signaturelock-open Commit is signed but in an unrecognized format.

fix detectNativeCpuAndFeatures including foreign asm


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

lib/std/zig/system.zig+4-1
......@@ -863,7 +863,10 @@ pub const NativeTargetInfo = struct {
863863 }
864864
865865 fn detectNativeCpuAndFeatures(cpu_arch: Target.Cpu.Arch, os: Target.Os, cross_target: CrossTarget) ?Target.Cpu {
866 switch (cpu_arch) {
866 // Here we switch on a comptime value rather than `cpu_arch`. This is valid because `cpu_arch`,
867 // although it is a runtime value, is guaranteed to be one of the architectures in the set
868 // of the respective switch prong.
869 switch (std.Target.current.cpu.arch) {
867870 .x86_64, .i386 => {
868871 return @import("system/x86.zig").detectNativeCpuAndFeatures(cpu_arch, os, cross_target);
869872 },