From ed1f00582670df44c15875914a1cc8fc0ff6329f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 22 May 2026 19:13:04 -0700 Subject: [PATCH] Maker: finish implementing Step.Compile.appendIncludeDirFlags --- lib/compiler/Maker/Step/Compile.zig | 13 +++++-------- lib/compiler/configurer.zig | 2 +- lib/std/Build/Configuration.zig | 2 -- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/compiler/Maker/Step/Compile.zig b/lib/compiler/Maker/Step/Compile.zig index c237fd61e7c5fd80e9b927749930008b099f8194..859a24d4c4d7e44e9a7f212047e58af6a524db84 100644 --- 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| { + .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"); - ch.getOutputDir(); - }, - .other_step => |comp| { - 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 index b47fd2da92c1a5ae9850ee2649b1c0668e5700bf..b81ee9de0d351115befc777ec102403a41cb49b7 100644 --- 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 index 63bc3027386868ecf5def1d62f32448f19402367..d19a357b50571ceb93b455e38a590241957414a7 100644 --- 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, -- 2.54.0