From 38698f4f6aabb20639642afa58b17f31a43e162b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 10 Apr 2023 16:38:24 -0700 Subject: [PATCH] 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 --- lib/std/Build/CompileStep.zig | 2 -- lib/std/Build/InstallArtifactStep.zig | 3 --- 2 files changed, 5 deletions(-) diff --git a/lib/std/Build/CompileStep.zig b/lib/std/Build/CompileStep.zig index d1beff69fc..bdb0ed8aae 100644 --- a/lib/std/Build/CompileStep.zig +++ b/lib/std/Build/CompileStep.zig @@ -111,7 +111,6 @@ vcpkg_bin_path: ?[]const u8 = null, /// This may be set in order to override the default install directory override_dest_dir: ?InstallDir, installed_path: ?[]const u8, -install_step: ?*InstallArtifactStep, /// Base address for an executable image. image_base: ?u64 = null, @@ -390,7 +389,6 @@ pub fn create(owner: *std.Build, options: Options) *CompileStep { .output_dir = null, .override_dest_dir = null, .installed_path = null, - .install_step = null, .force_undefined_symbols = StringHashMap(void).init(owner.allocator), .output_path_source = GeneratedFile{ .step = &self.step }, diff --git a/lib/std/Build/InstallArtifactStep.zig b/lib/std/Build/InstallArtifactStep.zig index b3ebcad89e..50cf6ff323 100644 --- a/lib/std/Build/InstallArtifactStep.zig +++ b/lib/std/Build/InstallArtifactStep.zig @@ -17,8 +17,6 @@ h_dir: ?InstallDir, dest_sub_path: ?[]const u8, pub fn create(owner: *std.Build, artifact: *CompileStep) *InstallArtifactStep { - if (artifact.install_step) |s| return s; - const self = owner.allocator.create(InstallArtifactStep) catch @panic("OOM"); self.* = InstallArtifactStep{ .step = Step.init(.{ @@ -44,7 +42,6 @@ pub fn create(owner: *std.Build, artifact: *CompileStep) *InstallArtifactStep { .dest_sub_path = null, }; self.step.dependOn(&artifact.step); - artifact.install_step = self; owner.pushInstalledFile(self.dest_dir, artifact.out_filename); if (self.artifact.isDynamicLibrary()) {