authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-04-10 16:38:24-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-04-10 18:35:14-07:00
log38698f4f6aabb20639642afa58b17f31a43e162b
tree76d5a9f1c01b7e77cc530a961406d6edb903849f
parentd2ad3f5074877475c8f0ec0fbbb323a05fe8cf78

std.Build.CompileStep: delete install_step field

This was used to ensure that an artifact would only be installed once, but this is not only unnecessary, but actively harmful, in the face of dependencies. see #15079

2 files changed, 0 insertions(+), 5 deletions(-)

lib/std/Build/CompileStep.zig-2
......@@ -111,7 +111,6 @@ vcpkg_bin_path: ?[]const u8 = null,
111111/// This may be set in order to override the default install directory
112112override_dest_dir: ?InstallDir,
113113installed_path: ?[]const u8,
114install_step: ?*InstallArtifactStep,
115114
116115/// Base address for an executable image.
117116image_base: ?u64 = null,
......@@ -390,7 +389,6 @@ pub fn create(owner: *std.Build, options: Options) *CompileStep {
390389 .output_dir = null,
391390 .override_dest_dir = null,
392391 .installed_path = null,
393 .install_step = null,
394392 .force_undefined_symbols = StringHashMap(void).init(owner.allocator),
395393
396394 .output_path_source = GeneratedFile{ .step = &self.step },
lib/std/Build/InstallArtifactStep.zig-3
......@@ -17,8 +17,6 @@ h_dir: ?InstallDir,
1717dest_sub_path: ?[]const u8,
1818
1919pub fn create(owner: *std.Build, artifact: *CompileStep) *InstallArtifactStep {
20 if (artifact.install_step) |s| return s;
21
2220 const self = owner.allocator.create(InstallArtifactStep) catch @panic("OOM");
2321 self.* = InstallArtifactStep{
2422 .step = Step.init(.{
......@@ -44,7 +42,6 @@ pub fn create(owner: *std.Build, artifact: *CompileStep) *InstallArtifactStep {
4442 .dest_sub_path = null,
4543 };
4644 self.step.dependOn(&artifact.step);
47 artifact.install_step = self;
4845
4946 owner.pushInstalledFile(self.dest_dir, artifact.out_filename);
5047 if (self.artifact.isDynamicLibrary()) {