diff options
Diffstat (limited to 'lib/std/Build/Module.zig')
| -rw-r--r-- | lib/std/Build/Module.zig | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/std/Build/Module.zig b/lib/std/Build/Module.zig index 46c6a19578..8937f21e88 100644 --- a/lib/std/Build/Module.zig +++ b/lib/std/Build/Module.zig @@ -265,8 +265,7 @@ fn addShallowDependencies(m: *Module, dependee: *Module) void { for (dependee.link_objects.items) |link_object| switch (link_object) { .other_step => |compile| { addStepDependencies(m, dependee, &compile.step); - for (compile.installed_headers.items) |install_step| - addStepDependenciesOnly(m, install_step); + addLazyPathDependenciesOnly(m, compile.getEmittedIncludeTree()); }, .static_path, @@ -691,20 +690,14 @@ pub fn appendZigProcessFlags( }, .other_step => |other| { if (other.generated_h) |header| { - try zig_args.append("-isystem"); - try zig_args.append(std.fs.path.dirname(header.path.?).?); + try zig_args.appendSlice(&.{ "-isystem", std.fs.path.dirname(header.getPath()).? }); } - if (other.installed_headers.items.len > 0) { - try zig_args.append("-I"); - try zig_args.append(b.pathJoin(&.{ - other.step.owner.install_prefix, "include", - })); + if (other.installed_headers_include_tree) |include_tree| { + try zig_args.appendSlice(&.{ "-I", include_tree.generated_directory.getPath() }); } }, .config_header_step => |config_header| { - const full_file_path = config_header.output_file.path.?; - const header_dir_path = full_file_path[0 .. full_file_path.len - config_header.include_path.len]; - try zig_args.appendSlice(&.{ "-I", header_dir_path }); + try zig_args.appendSlice(&.{ "-I", std.fs.path.dirname(config_header.output_file.getPath()).? }); }, } } @@ -752,9 +745,7 @@ fn linkLibraryOrObject(m: *Module, other: *Step.Compile) void { m.link_objects.append(allocator, .{ .other_step = other }) catch @panic("OOM"); m.include_dirs.append(allocator, .{ .other_step = other }) catch @panic("OOM"); - for (other.installed_headers.items) |install_step| { - addStepDependenciesOnly(m, install_step); - } + addLazyPathDependenciesOnly(m, other.getEmittedIncludeTree()); } fn requireKnownTarget(m: *Module) std.Target { |
