zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 7481a4ad089c0195fe238ef160ec667e3f604d22 (tree)
parent edef35bb57c3e205b5adb577828aa90681793151
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu,  3 Oct 2019 16:02:24 -0400

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

Diffstat:
Mlib/std/build.zig | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/std/build.zig b/lib/std/build.zig @@ -1163,10 +1163,15 @@ pub const Target = union(enum) { } pub fn exeFileExt(self: Target) []const u8 { - return switch (self.getOs()) { - .windows => ".exe", - else => "", - }; + if (self.isWindows()) { + return ".exe"; + } else if (self.isUefi()) { + return ".efi"; + } else if (self.isWasm()) { + return ".wasm"; + } else { + return ""; + } } pub fn staticLibSuffix(self: Target) []const u8 {