| ... | ... | @@ -673,6 +673,7 @@ pub const Builder = struct { |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | pub fn findProgram(self: &Builder, names: []const []const u8, paths: []const []const u8) -> %[]const u8 { |
| 676 | const exe_extension = (Target { .Native = {}}).exeFileExt(); |
| 676 | 677 | if (self.env_map.get("PATH")) |PATH| { |
| 677 | 678 | for (names) |name| { |
| 678 | 679 | if (os.path.isAbsolute(name)) { |
| ... | ... | @@ -680,7 +681,7 @@ pub const Builder = struct { |
| 680 | 681 | } |
| 681 | 682 | var it = mem.split(PATH, []u8{os.path.delimiter}); |
| 682 | 683 | while (it.next()) |path| { |
| 683 | | const full_path = %return os.path.join(self.allocator, path, name); |
| 684 | const full_path = %return os.path.join(self.allocator, path, self.fmt("{}{}", name, exe_extension)); |
| 684 | 685 | if (os.path.real(self.allocator, full_path)) |real_path| { |
| 685 | 686 | return real_path; |
| 686 | 687 | } else |_| { |
| ... | ... | @@ -694,7 +695,7 @@ pub const Builder = struct { |
| 694 | 695 | return name; |
| 695 | 696 | } |
| 696 | 697 | for (paths) |path| { |
| 697 | | const full_path = %return os.path.join(self.allocator, path, name); |
| 698 | const full_path = %return os.path.join(self.allocator, path, self.fmt("{}{}", name, exe_extension)); |
| 698 | 699 | if (os.path.real(self.allocator, full_path)) |real_path| { |
| 699 | 700 | return real_path; |
| 700 | 701 | } else |_| { |
| ... | ... | @@ -902,7 +903,7 @@ pub const LibExeObjStep = struct { |
| 902 | 903 | .kind = kind, |
| 903 | 904 | .root_src = root_src, |
| 904 | 905 | .name = name, |
| 905 | | .target = Target { .Native = {} }, |
| 906 | .target = Target.Native, |
| 906 | 907 | .linker_script = null, |
| 907 | 908 | .link_libs = BufSet.init(builder.allocator), |
| 908 | 909 | .frameworks = BufSet.init(builder.allocator), |
| ... | ... | @@ -938,7 +939,7 @@ pub const LibExeObjStep = struct { |
| 938 | 939 | .kind = kind, |
| 939 | 940 | .version = *version, |
| 940 | 941 | .static = static, |
| 941 | | .target = Target { .Native = {} }, |
| 942 | .target = Target.Native, |
| 942 | 943 | .cflags = ArrayList([]const u8).init(builder.allocator), |
| 943 | 944 | .source_files = ArrayList([]const u8).init(builder.allocator), |
| 944 | 945 | .object_files = ArrayList([]const u8).init(builder.allocator), |