authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-22 19:13:04-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:36-07:00
loged1f00582670df44c15875914a1cc8fc0ff6329f
tree7d256d743399ad131ec5c4cb54f4869305236387
parent31c159c228ecf6c2ffcf44ee44621c3d6b1ceb61

Maker: finish implementing Step.Compile.appendIncludeDirFlags


3 files changed, 6 insertions(+), 11 deletions(-)

lib/compiler/Maker/Step/Compile.zig+5-8
......@@ -1354,6 +1354,7 @@ pub fn appendIncludeDirFlags(
13541354) !void {
13551355 const graph = maker.graph;
13561356 const arena = graph.arena; // TODO don't leak into the process arena
1357 const conf = &maker.scanned_config.configuration;
13571358
13581359 switch (include_dir) {
13591360 .path => |lp| {
......@@ -1376,15 +1377,11 @@ pub fn appendIncludeDirFlags(
13761377 zig_args.appendAssumeCapacity("-iframework");
13771378 zig_args.appendAssumeCapacity(try maker.resolveLazyPathIndexAbs(arena, lp, asking_step));
13781379 },
1379 .config_header_step => |ch| {
1380 zig_args.appendAssumeCapacity("-I");
1381 if (true) @panic("TODO appendIncludeDirFlags");
1382 ch.getOutputDir();
1383 },
1384 .other_step => |comp| {
1380 .config_header_step => |ch_index| {
1381 const conf_ch = ch_index.ptr(conf).extended.get(conf.extra).config_header;
1382 const path = maker.generatedPath(conf_ch.generated_dir).*;
13851383 zig_args.appendAssumeCapacity("-I");
1386 if (true) @panic("TODO appendIncludeDirFlags");
1387 comp.installed_headers_include_tree.?.getDirectory();
1384 zig_args.appendAssumeCapacity(try path.toString(arena));
13881385 },
13891386 .embed_path => |lazy_path| {
13901387 zig_args.appendAssumeCapacity(try allocPrint(arena, "--embed-dir={f}", .{
lib/compiler/configurer.zig+1-1
......@@ -469,7 +469,7 @@ const Serialize = struct {
469469 .framework_path => |lp| .{ .framework_path = try addLazyPath(s, lp) },
470470 .framework_path_system => |lp| .{ .framework_path_system = try addLazyPath(s, lp) },
471471 .embed_path => |lp| .{ .embed_path = try addLazyPath(s, lp) },
472 .other_step => |cs| .{ .other_step = stepIndex(s, &cs.step) },
472 .other_step => |cs| .{ .path = try addLazyPath(s, cs.installed_headers_include_tree.?.getDirectory()) },
473473 .config_header_step => |chs| .{ .config_header_step = stepIndex(s, &chs.step) },
474474 };
475475 return result;
lib/std/Build/Configuration.zig-2
......@@ -1680,8 +1680,6 @@ pub const Module = struct {
16801680 path_after: LazyPath.Index,
16811681 framework_path: LazyPath.Index,
16821682 framework_path_system: LazyPath.Index,
1683 /// Always `Step.Tag.compile`.
1684 other_step: Step.Index,
16851683 /// Always `Step.Tag.config_header`.
16861684 config_header_step: Step.Index,
16871685 embed_path: LazyPath.Index,