authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-03 16:02:24-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-03 16:02:24-04:00
log7481a4ad089c0195fe238ef160ec667e3f604d22
tree16680249dc356d56d05cc296e78bad75cab840e2
parentedef35bb57c3e205b5adb577828aa90681793151
signaturelock-open Commit is signed but in an unrecognized format.

zig build: fix exe file ext to match target.cpp


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

lib/std/build.zig+9-4
...@@ -1163,10 +1163,15 @@ pub const Target = union(enum) {...@@ -1163,10 +1163,15 @@ pub const Target = union(enum) {
1163 }1163 }
11641164
1165 pub fn exeFileExt(self: Target) []const u8 {1165 pub fn exeFileExt(self: Target) []const u8 {
1166 return switch (self.getOs()) {1166 if (self.isWindows()) {
1167 .windows => ".exe",1167 return ".exe";
1168 else => "",1168 } else if (self.isUefi()) {
1169 };1169 return ".efi";
1170 } else if (self.isWasm()) {
1171 return ".wasm";
1172 } else {
1173 return "";
1174 }
1170 }1175 }
11711176
1172 pub fn staticLibSuffix(self: Target) []const u8 {1177 pub fn staticLibSuffix(self: Target) []const u8 {