Function artifact [src]

Prototype

pub fn artifact(d: *Dependency, name: []const u8) *Step.Compile

Parameters

d: *Dependencyname: []const u8

Source

pub fn artifact(d: *Dependency, name: []const u8) *Step.Compile { var found: ?*Step.Compile = null; for (d.builder.install_tls.step.dependencies.items) |dep_step| { const inst = dep_step.cast(Step.InstallArtifact) orelse continue; if (mem.eql(u8, inst.artifact.name, name)) { if (found != null) panic("artifact name '{s}' is ambiguous", .{name}); found = inst.artifact; } } return found orelse { for (d.builder.install_tls.step.dependencies.items) |dep_step| { const inst = dep_step.cast(Step.InstallArtifact) orelse continue; log.info("available artifact: '{s}'", .{inst.artifact.name}); } panic("unable to find artifact '{s}'", .{name}); }; }