Skip to content

Commit a1af61f

Browse files
committed
std.Build.CompileStep: proper step dependency on headers
Rather than calling make() from within make().
1 parent 24ce666 commit a1af61f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/std/Build/CompileStep.zig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,10 @@ fn linkLibraryOrObject(self: *CompileStep, other: *CompileStep) void {
11121112
self.step.dependOn(&other.step);
11131113
self.link_objects.append(.{ .other_step = other }) catch @panic("OOM");
11141114
self.include_dirs.append(.{ .other_step = other }) catch @panic("OOM");
1115+
1116+
for (other.installed_headers.items) |install_step| {
1117+
self.step.dependOn(install_step);
1118+
}
11151119
}
11161120

11171121
fn appendModuleArgs(
@@ -1699,9 +1703,6 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
16991703
try zig_args.append(fs.path.dirname(h_path).?);
17001704
}
17011705
if (other.installed_headers.items.len > 0) {
1702-
for (other.installed_headers.items) |install_step| {
1703-
try install_step.make(prog_node);
1704-
}
17051706
try zig_args.append("-I");
17061707
try zig_args.append(b.pathJoin(&.{
17071708
other.step.owner.install_prefix, "include",

0 commit comments

Comments
 (0)