Extract packages from all top level steps
This commit is contained in:
parent
bfdeecbd04
commit
819b367360
@ -5,6 +5,7 @@ const fmt = std.fmt;
|
|||||||
const Builder = std.build.Builder;
|
const Builder = std.build.Builder;
|
||||||
const Pkg = std.build.Pkg;
|
const Pkg = std.build.Pkg;
|
||||||
const InstallArtifactStep = std.build.InstallArtifactStep;
|
const InstallArtifactStep = std.build.InstallArtifactStep;
|
||||||
|
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
|
||||||
@ -26,10 +27,16 @@ pub fn main() !void {
|
|||||||
// TODO: We currently add packages from every LibExeObj step that the install step depends on.
|
// TODO: We currently add packages from every LibExeObj step that the install step depends on.
|
||||||
// Should we error out or keep one step or something similar?
|
// Should we error out or keep one step or something similar?
|
||||||
// We also flatten them, we should probably keep the nested structure.
|
// We also flatten them, we should probably keep the nested structure.
|
||||||
for (builder.getInstallStep().dependencies.items) |step| {
|
for (builder.top_level_steps.items) |tls| {
|
||||||
if (step.cast(InstallArtifactStep)) |install_exe| {
|
for (tls.step.dependencies.items) |step| {
|
||||||
for (install_exe.artifact.packages.items) |pkg| {
|
if (step.cast(InstallArtifactStep)) |install_exe| {
|
||||||
try processPackage(stdout_stream, pkg);
|
for (install_exe.artifact.packages.items) |pkg| {
|
||||||
|
try processPackage(stdout_stream, pkg);
|
||||||
|
}
|
||||||
|
} else if (step.cast(LibExeObjStep)) |exe| {
|
||||||
|
for (exe.packages.items) |pkg| {
|
||||||
|
try processPackage(stdout_stream, pkg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user