From 83d89a05b7670c5c25d4f0f717ac5168a9cb6557 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Fri, 4 Nov 2022 17:52:10 +0100 Subject: coff: compile and link simple exit program on arm64 * make image base target dependent * fix relocs to imports --- lib/std/io.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/std') diff --git a/lib/std/io.zig b/lib/std/io.zig index d878afd3ae..b12ca80142 100644 --- a/lib/std/io.zig +++ b/lib/std/io.zig @@ -36,7 +36,7 @@ pub const default_mode: ModeOverride = if (is_async) Mode.evented else .blocking fn getStdOutHandle() os.fd_t { if (builtin.os.tag == .windows) { - if (builtin.zig_backend == .stage2_x86_64) { + if (builtin.zig_backend == .stage2_x86_64 or builtin.zig_backend == .stage2_aarch64) { // TODO: this is just a temporary workaround until we advance x86 backend further along. return os.windows.GetStdHandle(os.windows.STD_OUTPUT_HANDLE) catch os.windows.INVALID_HANDLE_VALUE; } @@ -62,7 +62,7 @@ pub fn getStdOut() File { fn getStdErrHandle() os.fd_t { if (builtin.os.tag == .windows) { - if (builtin.zig_backend == .stage2_x86_64) { + if (builtin.zig_backend == .stage2_x86_64 or builtin.zig_backend == .stage2_aarch64) { // TODO: this is just a temporary workaround until we advance x86 backend further along. return os.windows.GetStdHandle(os.windows.STD_ERROR_HANDLE) catch os.windows.INVALID_HANDLE_VALUE; } @@ -88,7 +88,7 @@ pub fn getStdErr() File { fn getStdInHandle() os.fd_t { if (builtin.os.tag == .windows) { - if (builtin.zig_backend == .stage2_x86_64) { + if (builtin.zig_backend == .stage2_x86_64 or builtin.zig_backend == .stage2_aarch64) { // TODO: this is just a temporary workaround until we advance x86 backend further along. return os.windows.GetStdHandle(os.windows.STD_INPUT_HANDLE) catch os.windows.INVALID_HANDLE_VALUE; } -- cgit v1.2.3