From c42439dff9bdfa1ff90e4243ec7eaad94f4241ca Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Wed, 24 Nov 2021 20:34:13 +0100 Subject: Pass inferred cpu_arch to defaultVersionRange This is mainly because arm64 macOS doesn't support all versions supported by x86_64 macOS. This is just a temporary thing until both architectures support the same set of OSes. --- src/stage1/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stage1/codegen.cpp') diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index 76e9b3edc2..163813194b 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -9305,7 +9305,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { buf_appendf(contents, "pub const abi = std.Target.Abi.%s;\n", cur_abi); buf_appendf(contents, "pub const cpu = std.Target.Cpu.baseline(.%s);\n", cur_arch); buf_appendf(contents, "pub const stage2_arch: std.Target.Cpu.Arch = .%s;\n", cur_arch); - buf_appendf(contents, "pub const os = std.Target.Os.Tag.defaultVersionRange(.%s);\n", cur_os); + buf_appendf(contents, "pub const os = std.Target.Os.Tag.defaultVersionRange(.%s, .%s);\n", cur_os, cur_arch); buf_appendf(contents, "pub const target = std.Target{\n" " .cpu = cpu,\n" -- cgit v1.2.3