| ... | ... | @@ -204,10 +204,10 @@ pub const Builder = struct { |
| 204 | 204 | pub fn resolveInstallPrefix(self: *Builder, install_prefix: ?[]const u8, dir_list: DirList) void { |
| 205 | 205 | if (self.dest_dir) |dest_dir| { |
| 206 | 206 | self.install_prefix = install_prefix orelse "/usr"; |
| 207 | | self.install_path = self.pathJoin(&[_][]const u8{ dest_dir, self.install_prefix }); |
| 207 | self.install_path = self.pathJoin(&.{ dest_dir, self.install_prefix }); |
| 208 | 208 | } else { |
| 209 | 209 | self.install_prefix = install_prefix orelse |
| 210 | | (self.pathJoin(&[_][]const u8{ self.build_root, "zig-out" })); |
| 210 | (self.pathJoin(&.{ self.build_root, "zig-out" })); |
| 211 | 211 | self.install_path = self.install_prefix; |
| 212 | 212 | } |
| 213 | 213 | |
| ... | ... | @@ -1103,7 +1103,7 @@ pub const Builder = struct { |
| 1103 | 1103 | if (fs.path.isAbsolute(name)) { |
| 1104 | 1104 | return name; |
| 1105 | 1105 | } |
| 1106 | | const full_path = self.pathJoin(&[_][]const u8{ |
| 1106 | const full_path = self.pathJoin(&.{ |
| 1107 | 1107 | search_prefix, |
| 1108 | 1108 | "bin", |
| 1109 | 1109 | self.fmt("{s}{s}", .{ name, exe_extension }), |
| ... | ... | @@ -1118,7 +1118,7 @@ pub const Builder = struct { |
| 1118 | 1118 | } |
| 1119 | 1119 | var it = mem.tokenize(u8, PATH, &[_]u8{fs.path.delimiter}); |
| 1120 | 1120 | while (it.next()) |path| { |
| 1121 | | const full_path = self.pathJoin(&[_][]const u8{ |
| 1121 | const full_path = self.pathJoin(&.{ |
| 1122 | 1122 | path, |
| 1123 | 1123 | self.fmt("{s}{s}", .{ name, exe_extension }), |
| 1124 | 1124 | }); |
| ... | ... | @@ -1131,7 +1131,7 @@ pub const Builder = struct { |
| 1131 | 1131 | return name; |
| 1132 | 1132 | } |
| 1133 | 1133 | for (paths) |path| { |
| 1134 | | const full_path = self.pathJoin(&[_][]const u8{ |
| 1134 | const full_path = self.pathJoin(&.{ |
| 1135 | 1135 | path, |
| 1136 | 1136 | self.fmt("{s}{s}", .{ name, exe_extension }), |
| 1137 | 1137 | }); |
| ... | ... | @@ -1230,7 +1230,7 @@ pub const Builder = struct { |
| 1230 | 1230 | .bin => self.exe_dir, |
| 1231 | 1231 | .lib => self.lib_dir, |
| 1232 | 1232 | .header => self.h_dir, |
| 1233 | | .custom => |path| self.pathJoin(&[_][]const u8{ self.install_path, path }), |
| 1233 | .custom => |path| self.pathJoin(&.{ self.install_path, path }), |
| 1234 | 1234 | }; |
| 1235 | 1235 | return fs.path.resolve( |
| 1236 | 1236 | self.allocator, |
| ... | ... | @@ -1707,7 +1707,7 @@ pub const LibExeObjStep = struct { |
| 1707 | 1707 | } |
| 1708 | 1708 | if (self.output_dir != null) { |
| 1709 | 1709 | self.output_lib_path_source.path = self.builder.pathJoin( |
| 1710 | | &[_][]const u8{ self.output_dir.?, self.out_lib_filename }, |
| 1710 | &.{ self.output_dir.?, self.out_lib_filename }, |
| 1711 | 1711 | ); |
| 1712 | 1712 | } |
| 1713 | 1713 | } |
| ... | ... | @@ -2135,14 +2135,14 @@ pub const LibExeObjStep = struct { |
| 2135 | 2135 | const triplet = try self.target.vcpkgTriplet(allocator, if (linkage == .static) .Static else .Dynamic); |
| 2136 | 2136 | defer self.builder.allocator.free(triplet); |
| 2137 | 2137 | |
| 2138 | | const include_path = self.pathJoin(&[_][]const u8{ root, "installed", triplet, "include" }); |
| 2138 | const include_path = self.builder.pathJoin(&.{ root, "installed", triplet, "include" }); |
| 2139 | 2139 | errdefer allocator.free(include_path); |
| 2140 | 2140 | try self.include_dirs.append(IncludeDir{ .raw_path = include_path }); |
| 2141 | 2141 | |
| 2142 | | const lib_path = self.pathJoin(&[_][]const u8{ root, "installed", triplet, "lib" }); |
| 2142 | const lib_path = self.builder.pathJoin(&.{ root, "installed", triplet, "lib" }); |
| 2143 | 2143 | try self.lib_paths.append(lib_path); |
| 2144 | 2144 | |
| 2145 | | self.vcpkg_bin_path = self.pathJoin(&[_][]const u8{ root, "installed", triplet, "bin" }); |
| 2145 | self.vcpkg_bin_path = self.builder.pathJoin(&.{ root, "installed", triplet, "bin" }); |
| 2146 | 2146 | }, |
| 2147 | 2147 | } |
| 2148 | 2148 | } |
| ... | ... | @@ -2642,11 +2642,11 @@ pub const LibExeObjStep = struct { |
| 2642 | 2642 | |
| 2643 | 2643 | for (builder.search_prefixes.items) |search_prefix| { |
| 2644 | 2644 | try zig_args.append("-L"); |
| 2645 | | try zig_args.append(builder.pathJoin(&[_][]const u8{ |
| 2645 | try zig_args.append(builder.pathJoin(&.{ |
| 2646 | 2646 | search_prefix, "lib", |
| 2647 | 2647 | })); |
| 2648 | 2648 | try zig_args.append("-isystem"); |
| 2649 | | try zig_args.append(builder.pathJoin(&[_][]const u8{ |
| 2649 | try zig_args.append(builder.pathJoin(&.{ |
| 2650 | 2650 | search_prefix, "include", |
| 2651 | 2651 | })); |
| 2652 | 2652 | } |
| ... | ... | @@ -2752,18 +2752,18 @@ pub const LibExeObjStep = struct { |
| 2752 | 2752 | // Update generated files |
| 2753 | 2753 | if (self.output_dir != null) { |
| 2754 | 2754 | self.output_path_source.path = builder.pathJoin( |
| 2755 | | &[_][]const u8{ self.output_dir.?, self.out_filename }, |
| 2755 | &.{ self.output_dir.?, self.out_filename }, |
| 2756 | 2756 | ); |
| 2757 | 2757 | |
| 2758 | 2758 | if (self.emit_h) { |
| 2759 | 2759 | self.output_h_path_source.path = builder.pathJoin( |
| 2760 | | &[_][]const u8{ self.output_dir.?, self.out_h_filename }, |
| 2760 | &.{ self.output_dir.?, self.out_h_filename }, |
| 2761 | 2761 | ); |
| 2762 | 2762 | } |
| 2763 | 2763 | |
| 2764 | 2764 | if (self.target.isWindows() or self.target.isUefi()) { |
| 2765 | 2765 | self.output_pdb_path_source.path = builder.pathJoin( |
| 2766 | | &[_][]const u8{ self.output_dir.?, self.out_pdb_filename }, |
| 2766 | &.{ self.output_dir.?, self.out_pdb_filename }, |
| 2767 | 2767 | ); |
| 2768 | 2768 | } |
| 2769 | 2769 | } |
| ... | ... | @@ -2945,11 +2945,11 @@ pub const InstallDirStep = struct { |
| 2945 | 2945 | } |
| 2946 | 2946 | } |
| 2947 | 2947 | |
| 2948 | | const full_path = self.builder.pathJoin(&[_][]const u8{ |
| 2948 | const full_path = self.builder.pathJoin(&.{ |
| 2949 | 2949 | full_src_dir, entry.path, |
| 2950 | 2950 | }); |
| 2951 | 2951 | |
| 2952 | | const dest_path = self.builder.pathJoin(&[_][]const u8{ |
| 2952 | const dest_path = self.builder.pathJoin(&.{ |
| 2953 | 2953 | dest_prefix, entry.path, |
| 2954 | 2954 | }); |
| 2955 | 2955 | |