From fb67a7260d1e7fc8ff81fa9e3cc5340422363727 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 28 Apr 2020 15:34:53 -0400 Subject: [PATCH] link: recognize that Windows does not have POSIX fs modes --- src-self-hosted/link.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-self-hosted/link.zig b/src-self-hosted/link.zig index cb6aa40afe..9f01088359 100644 --- a/src-self-hosted/link.zig +++ b/src-self-hosted/link.zig @@ -11,7 +11,7 @@ const codegen = @import("codegen.zig"); /// with 0o755 permissions, but it works appropriately if the system is configured /// more leniently. As another data point, C's fopen seems to open files with the /// 666 mode. -const executable_mode = 0o777; +const executable_mode = if (std.Target.current.os.tag == .windows) 0 else 0o777; const default_entry_addr = 0x8000000; pub const ErrorMsg = struct {