diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index 2371f49daf46..77a5a81324f1 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -1440,7 +1440,9 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { if (self.emit_llvm_bc.getArg(b, "emit-llvm-bc")) |arg| try zig_args.append(arg); if (self.emit_llvm_ir.getArg(b, "emit-llvm-ir")) |arg| try zig_args.append(arg); - if (self.emit_h) try zig_args.append("-femit-h"); + if (self.emit_h) { + try zig_args.append(try std.fmt.allocPrint(b.allocator, "-femit-h={s}", .{ self.out_h_filename })); + } try addFlag(&zig_args, "strip", self.strip); try addFlag(&zig_args, "unwind-tables", self.unwind_tables); diff --git a/lib/std/Build/Step/InstallArtifact.zig b/lib/std/Build/Step/InstallArtifact.zig index 9552a4444044..840807ac88c6 100644 --- a/lib/std/Build/Step/InstallArtifact.zig +++ b/lib/std/Build/Step/InstallArtifact.zig @@ -57,9 +57,6 @@ pub fn create(owner: *std.Build, artifact: *Step.Compile) *InstallArtifact { if (self.pdb_dir) |pdb_dir| { owner.pushInstalledFile(pdb_dir, artifact.out_pdb_filename); } - if (self.h_dir) |h_dir| { - owner.pushInstalledFile(h_dir, artifact.out_h_filename); - } return self; } @@ -114,16 +111,6 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { }; all_cached = all_cached and p == .fresh; } - if (self.h_dir) |h_dir| { - const full_src_path = self.artifact.getOutputHSource().getPath(src_builder); - const full_h_path = dest_builder.getInstallPath(h_dir, self.artifact.out_h_filename); - const p = fs.Dir.updateFile(cwd, full_src_path, cwd, full_h_path, .{}) catch |err| { - return step.fail("unable to update file from '{s}' to '{s}': {s}", .{ - full_src_path, full_h_path, @errorName(err), - }); - }; - all_cached = all_cached and p == .fresh; - } self.artifact.installed_path = full_dest_path; step.result_cached = all_cached; }