1//! Fail the build with a given message.
2const Fail = @This();
3
4const std = @import("std");
5const Step = std.Build.Step;
6const Configuration = std.Build.Configuration;
7
8step: Step,
9error_msg: Configuration.String,
10
11pub const base_tag: Step.Tag = .fail;
12
13pub fn create(owner: *std.Build, error_msg: []const u8) *Fail {
14 const graph = owner.graph;
15 const fail = graph.create(Fail);
16 fail.* = .{
17 .step = .init(.{
18 .tag = base_tag,
19 .name = "fail",
20 .owner = owner,
21 }),
22 .error_msg = graph.addString(error_msg),
23 };
24 return fail;
25}