| ... | @@ -50,7 +50,6 @@ install_path: []const u8, | ... | @@ -50,7 +50,6 @@ install_path: []const u8, |
| 50 | sysroot: ?[]const u8 = null, | 50 | sysroot: ?[]const u8 = null, |
| 51 | search_prefixes: std.ArrayListUnmanaged([]const u8), | 51 | search_prefixes: std.ArrayListUnmanaged([]const u8), |
| 52 | libc_file: ?[]const u8 = null, | 52 | libc_file: ?[]const u8 = null, |
| 53 | installed_files: ArrayList(InstalledFile), | | |
| 54 | /// Path to the directory containing build.zig. | 53 | /// Path to the directory containing build.zig. |
| 55 | build_root: Cache.Directory, | 54 | build_root: Cache.Directory, |
| 56 | cache_root: Cache.Directory, | 55 | cache_root: Cache.Directory, |
| ... | @@ -331,7 +330,6 @@ pub fn create( | ... | @@ -331,7 +330,6 @@ pub fn create( |
| 331 | .exe_dir = undefined, | 330 | .exe_dir = undefined, |
| 332 | .h_dir = undefined, | 331 | .h_dir = undefined, |
| 333 | .dest_dir = graph.env_map.get("DESTDIR"), | 332 | .dest_dir = graph.env_map.get("DESTDIR"), |
| 334 | .installed_files = ArrayList(InstalledFile).init(arena), | | |
| 335 | .install_tls = .{ | 333 | .install_tls = .{ |
| 336 | .step = Step.init(.{ | 334 | .step = Step.init(.{ |
| 337 | .id = TopLevelStep.base_id, | 335 | .id = TopLevelStep.base_id, |
| ... | @@ -433,7 +431,6 @@ fn createChildOnly( | ... | @@ -433,7 +431,6 @@ fn createChildOnly( |
| 433 | .sysroot = parent.sysroot, | 431 | .sysroot = parent.sysroot, |
| 434 | .search_prefixes = parent.search_prefixes, | 432 | .search_prefixes = parent.search_prefixes, |
| 435 | .libc_file = parent.libc_file, | 433 | .libc_file = parent.libc_file, |
| 436 | .installed_files = ArrayList(InstalledFile).init(allocator), | | |
| 437 | .build_root = build_root, | 434 | .build_root = build_root, |
| 438 | .cache_root = parent.cache_root, | 435 | .cache_root = parent.cache_root, |
| 439 | .zig_lib_dir = parent.zig_lib_dir, | 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,15 +1135,8 @@ fn makeUninstall(uninstall_step: *Step, prog_node: std.Progress.Node) anyerror!v |
| 1138 | const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step); | 1135 | const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step); |
| 1139 | const b: *Build = @fieldParentPtr("uninstall_tls", uninstall_tls); | 1136 | const b: *Build = @fieldParentPtr("uninstall_tls", uninstall_tls); |
| 1140 | | 1137 | |
| 1141 | for (b.installed_files.items) |installed_file| { | 1138 | _ = b; |
| 1142 | const full_path = b.getInstallPath(installed_file.dir, installed_file.path); | 1139 | @panic("TODO implement https://github.com/ziglang/zig/issues/14943"); |
| 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 | | |
| 1150 | } | 1140 | } |
| 1151 | | 1141 | |
| 1152 | /// Creates a configuration option to be passed to the build.zig script. | 1142 | /// Creates a configuration option to be passed to the build.zig script. |
| ... | @@ -1719,15 +1709,6 @@ pub fn addCheckFile( | ... | @@ -1719,15 +1709,6 @@ pub fn addCheckFile( |
| 1719 | return Step.CheckFile.create(b, file_source, options); | 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 | pub fn truncateFile(b: *Build, dest_path: []const u8) !void { | 1712 | pub fn truncateFile(b: *Build, dest_path: []const u8) !void { |
| 1732 | if (b.verbose) { | 1713 | if (b.verbose) { |
| 1733 | log.info("truncate {s}", .{dest_path}); | 1714 | log.info("truncate {s}", .{dest_path}); |
| ... | @@ -2567,19 +2548,6 @@ pub const InstallDir = union(enum) { | ... | @@ -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 | /// This function is intended to be called in the `configure` phase only. | 2551 | /// This function is intended to be called in the `configure` phase only. |
| 2584 | /// It returns an absolute directory path, which is potentially going to be a | 2552 | /// It returns an absolute directory path, which is potentially going to be a |
| 2585 | /// source of API breakage in the future, so keep that in mind when using this | 2553 | /// source of API breakage in the future, so keep that in mind when using this |