| ... | ... | @@ -50,7 +50,6 @@ install_path: []const u8, |
| 50 | 50 | sysroot: ?[]const u8 = null, |
| 51 | 51 | search_prefixes: std.ArrayListUnmanaged([]const u8), |
| 52 | 52 | libc_file: ?[]const u8 = null, |
| 53 | | installed_files: ArrayList(InstalledFile), |
| 54 | 53 | /// Path to the directory containing build.zig. |
| 55 | 54 | build_root: Cache.Directory, |
| 56 | 55 | cache_root: Cache.Directory, |
| ... | ... | @@ -331,7 +330,6 @@ pub fn create( |
| 331 | 330 | .exe_dir = undefined, |
| 332 | 331 | .h_dir = undefined, |
| 333 | 332 | .dest_dir = graph.env_map.get("DESTDIR"), |
| 334 | | .installed_files = ArrayList(InstalledFile).init(arena), |
| 335 | 333 | .install_tls = .{ |
| 336 | 334 | .step = Step.init(.{ |
| 337 | 335 | .id = TopLevelStep.base_id, |
| ... | ... | @@ -433,7 +431,6 @@ fn createChildOnly( |
| 433 | 431 | .sysroot = parent.sysroot, |
| 434 | 432 | .search_prefixes = parent.search_prefixes, |
| 435 | 433 | .libc_file = parent.libc_file, |
| 436 | | .installed_files = ArrayList(InstalledFile).init(allocator), |
| 437 | 434 | .build_root = build_root, |
| 438 | 435 | .cache_root = parent.cache_root, |
| 439 | 436 | .zig_lib_dir = parent.zig_lib_dir, |
| ... | ... | @@ -1138,15 +1135,8 @@ fn makeUninstall(uninstall_step: *Step, prog_node: std.Progress.Node) anyerror!v |
| 1138 | 1135 | const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step); |
| 1139 | 1136 | const b: *Build = @fieldParentPtr("uninstall_tls", uninstall_tls); |
| 1140 | 1137 | |
| 1141 | | for (b.installed_files.items) |installed_file| { |
| 1142 | | const full_path = b.getInstallPath(installed_file.dir, installed_file.path); |
| 1143 | | if (b.verbose) { |
| 1144 | | log.info("rm {s}", .{full_path}); |
| 1145 | | } |
| 1146 | | fs.cwd().deleteTree(full_path) catch {}; |
| 1147 | | } |
| 1148 | | |
| 1149 | | // TODO remove empty directories |
| 1138 | _ = b; |
| 1139 | @panic("TODO implement https://github.com/ziglang/zig/issues/14943"); |
| 1150 | 1140 | } |
| 1151 | 1141 | |
| 1152 | 1142 | /// Creates a configuration option to be passed to the build.zig script. |
| ... | ... | @@ -1719,15 +1709,6 @@ pub fn addCheckFile( |
| 1719 | 1709 | return Step.CheckFile.create(b, file_source, options); |
| 1720 | 1710 | } |
| 1721 | 1711 | |
| 1722 | | /// deprecated: https://github.com/ziglang/zig/issues/14943 |
| 1723 | | pub fn pushInstalledFile(b: *Build, dir: InstallDir, dest_rel_path: []const u8) void { |
| 1724 | | const file = InstalledFile{ |
| 1725 | | .dir = dir, |
| 1726 | | .path = dest_rel_path, |
| 1727 | | }; |
| 1728 | | b.installed_files.append(file.dupe(b)) catch @panic("OOM"); |
| 1729 | | } |
| 1730 | | |
| 1731 | 1712 | pub fn truncateFile(b: *Build, dest_path: []const u8) !void { |
| 1732 | 1713 | if (b.verbose) { |
| 1733 | 1714 | log.info("truncate {s}", .{dest_path}); |
| ... | ... | @@ -2567,19 +2548,6 @@ pub const InstallDir = union(enum) { |
| 2567 | 2548 | } |
| 2568 | 2549 | }; |
| 2569 | 2550 | |
| 2570 | | pub const InstalledFile = struct { |
| 2571 | | dir: InstallDir, |
| 2572 | | path: []const u8, |
| 2573 | | |
| 2574 | | /// Duplicates the installed file path and directory. |
| 2575 | | pub fn dupe(file: InstalledFile, builder: *Build) InstalledFile { |
| 2576 | | return .{ |
| 2577 | | .dir = file.dir.dupe(builder), |
| 2578 | | .path = builder.dupe(file.path), |
| 2579 | | }; |
| 2580 | | } |
| 2581 | | }; |
| 2582 | | |
| 2583 | 2551 | /// This function is intended to be called in the `configure` phase only. |
| 2584 | 2552 | /// It returns an absolute directory path, which is potentially going to be a |
| 2585 | 2553 | /// source of API breakage in the future, so keep that in mind when using this |