commit ed1f00582670df44c15875914a1cc8fc0ff6329f (tree)
parent 31c159c228ecf6c2ffcf44ee44621c3d6b1ceb61
Author: Andrew Kelley <andrew@ziglang.org>
Date: Fri, 22 May 2026 19:13:04 -0700
Maker: finish implementing Step.Compile.appendIncludeDirFlags
Diffstat:
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/lib/compiler/Maker/Step/Compile.zig b/lib/compiler/Maker/Step/Compile.zig
@@ -1354,6 +1354,7 @@ pub fn appendIncludeDirFlags(
) !void {
const graph = maker.graph;
const arena = graph.arena; // TODO don't leak into the process arena
+ const conf = &maker.scanned_config.configuration;
switch (include_dir) {
.path => |lp| {
@@ -1376,15 +1377,11 @@ pub fn appendIncludeDirFlags(
zig_args.appendAssumeCapacity("-iframework");
zig_args.appendAssumeCapacity(try maker.resolveLazyPathIndexAbs(arena, lp, asking_step));
},
- .config_header_step => |ch| {
- zig_args.appendAssumeCapacity("-I");
- if (true) @panic("TODO appendIncludeDirFlags");
- ch.getOutputDir();
- },
- .other_step => |comp| {
+ .config_header_step => |ch_index| {
+ const conf_ch = ch_index.ptr(conf).extended.get(conf.extra).config_header;
+ const path = maker.generatedPath(conf_ch.generated_dir).*;
zig_args.appendAssumeCapacity("-I");
- if (true) @panic("TODO appendIncludeDirFlags");
- comp.installed_headers_include_tree.?.getDirectory();
+ zig_args.appendAssumeCapacity(try path.toString(arena));
},
.embed_path => |lazy_path| {
zig_args.appendAssumeCapacity(try allocPrint(arena, "--embed-dir={f}", .{
diff --git a/lib/compiler/configurer.zig b/lib/compiler/configurer.zig
@@ -469,7 +469,7 @@ const Serialize = struct {
.framework_path => |lp| .{ .framework_path = try addLazyPath(s, lp) },
.framework_path_system => |lp| .{ .framework_path_system = try addLazyPath(s, lp) },
.embed_path => |lp| .{ .embed_path = try addLazyPath(s, lp) },
- .other_step => |cs| .{ .other_step = stepIndex(s, &cs.step) },
+ .other_step => |cs| .{ .path = try addLazyPath(s, cs.installed_headers_include_tree.?.getDirectory()) },
.config_header_step => |chs| .{ .config_header_step = stepIndex(s, &chs.step) },
};
return result;
diff --git a/lib/std/Build/Configuration.zig b/lib/std/Build/Configuration.zig
@@ -1680,8 +1680,6 @@ pub const Module = struct {
path_after: LazyPath.Index,
framework_path: LazyPath.Index,
framework_path_system: LazyPath.Index,
- /// Always `Step.Tag.compile`.
- other_step: Step.Index,
/// Always `Step.Tag.config_header`.
config_header_step: Step.Index,
embed_path: LazyPath.Index,