Fix build runner for latest Zig
This commit is contained in:
parent
ee65d3a623
commit
04611ba1a1
@ -10,9 +10,9 @@ const InstallArtifactStep = std.build.InstallArtifactStep;
|
|||||||
const LibExeObjStep = std.build.LibExeObjStep;
|
const LibExeObjStep = std.build.LibExeObjStep;
|
||||||
const ArrayList = std.ArrayList;
|
const ArrayList = std.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
///! This is a modified build runner to extract information out of build.zig
|
///! This is a modified build runner to extract information out of build.zig
|
||||||
///! Modified from the std.special.build_runner
|
///! Modified from the std.special.build_runner
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
||||||
defer arena.deinit();
|
defer arena.deinit();
|
||||||
@ -84,7 +84,7 @@ fn processStep(stdout_stream: anytype, step: *std.build.Step) anyerror!void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn processPackage(out_stream: anytype, pkg: Pkg) anyerror!void {
|
fn processPackage(out_stream: anytype, pkg: Pkg) anyerror!void {
|
||||||
switch (pkg.path) {
|
switch (pkg.source) {
|
||||||
.path => |path| try out_stream.print("{s}\x00{s}\n", .{ pkg.name, path }),
|
.path => |path| try out_stream.print("{s}\x00{s}\n", .{ pkg.name, path }),
|
||||||
.generated => |generated| if (generated.path != null) try out_stream.print("{s}\x00{s}\n", .{ pkg.name, generated.path.? }),
|
.generated => |generated| if (generated.path != null) try out_stream.print("{s}\x00{s}\n", .{ pkg.name, generated.path.? }),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user