authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-02-28 21:13:54-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 10:48:13-07:00
log7efeedcd896b340a95cae50cd8c175a178465d8b
tree5fe49159ae56ee738255311ffe214c51bf4c51b2
parent7da34bd9e86fe32dec56e6e89a6d4615e2b50794

std.Build.CompileStep: better default step name


1 files changed, 7 insertions(+), 1 deletions(-)

lib/std/Build/CompileStep.zig+7-1
......@@ -312,6 +312,12 @@ pub fn create(builder: *std.Build, options: Options) *CompileStep {
312312 panic("invalid name: '{s}'. It looks like a file path, but it is supposed to be the library or application name.", .{name});
313313 }
314314
315 const step_name = builder.fmt("compile {s} {s} {s}", .{
316 name,
317 @tagName(options.optimize),
318 options.target.zigTriple(builder.allocator) catch @panic("OOM"),
319 });
320
315321 const self = builder.allocator.create(CompileStep) catch @panic("OOM");
316322 self.* = CompileStep{
317323 .strip = null,
......@@ -328,7 +334,7 @@ pub fn create(builder: *std.Build, options: Options) *CompileStep {
328334 .frameworks = StringHashMap(FrameworkLinkInfo).init(builder.allocator),
329335 .step = Step.init(builder.allocator, .{
330336 .id = base_id,
331 .name = name,
337 .name = step_name,
332338 .makeFn = make,
333339 }),
334340 .version = options.version,