feature. See also
. The project being documented here (as the example) is the Zig library itself.
Run.failForeign
fn failForeign(
arena: Allocator,
conf_run: *const Configuration.Step.Run,
maker: *Maker,
step_index: Configuration.Step.Index,
suggested_flag: []const u8,
argv0: []const u8,
artifact_target: *const std.Target,
host_target: *const std.Target,
) Step.ExtendedMakeError
File
Code
fn failForeign(
arena: Allocator,
conf_run: *const Configuration.Step.Run,
maker: *Maker,
step_index: Configuration.Step.Index,
suggested_flag: []const u8,
argv0: []const u8,
artifact_target: *const std.Target,
host_target: *const std.Target,
) Step.ExtendedMakeError {
const step = maker.stepByIndex(step_index);
switch (conf_run.flags.stdio) {
.check, .zig_test => {
if (conf_run.flags.skip_foreign_checks) return error.MakeSkipped;
const host_name = try host_target.zigTriple(arena);
const foreign_name = try artifact_target.zigTriple(arena);
return step.fail(maker,
\\unable to spawn foreign binary '{s}' ({s}) on host system ({s})
\\ consider using {s} or enabling skip_foreign_checks in the Run step
, .{ argv0, foreign_name, host_name, suggested_flag });
},
else => {
return step.fail(maker, "unable to spawn foreign binary '{s}'", .{argv0});
},
}
}