mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-30 12:56:37 +03:00
configurer: serialize Step.Fmt
This commit is contained in:
@@ -889,7 +889,18 @@ fn serialize(b: *std.Build, wc: *Configuration.Wip, writer: *Io.Writer) !void {
|
||||
})));
|
||||
},
|
||||
.find_program => @panic("TODO"),
|
||||
.fmt => @panic("TODO"),
|
||||
.fmt => e: {
|
||||
const sf: *Step.Fmt = @fieldParentPtr("step", step);
|
||||
break :e @enumFromInt(try wc.addExtra(@as(Configuration.Step.Fmt, .{
|
||||
.flags = .{
|
||||
.paths = sf.paths.len != 0,
|
||||
.exclude_paths = sf.exclude_paths.len != 0,
|
||||
.check = sf.check,
|
||||
},
|
||||
.paths = .{ .slice = try s.initLazyPathList(sf.paths) },
|
||||
.exclude_paths = .{ .slice = try s.initLazyPathList(sf.exclude_paths) },
|
||||
})));
|
||||
},
|
||||
.translate_c => @panic("TODO"),
|
||||
.write_file => e: {
|
||||
const wf: *Step.WriteFile = @fieldParentPtr("step", step);
|
||||
|
||||
@@ -26,8 +26,7 @@ pub const Options = struct {
|
||||
|
||||
pub fn create(owner: *std.Build, options: Options) *Fmt {
|
||||
const graph = owner.graph;
|
||||
const arena = graph.arena;
|
||||
const fmt = arena.create(Fmt) catch @panic("OOM");
|
||||
const fmt = graph.create(Fmt);
|
||||
|
||||
fmt.* = .{
|
||||
.step = .init(.{
|
||||
|
||||
Reference in New Issue
Block a user