authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-06-04 01:10:48-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-06-04 12:25:49-04:00
log100b76e17a7523edc04aa7fa97806c183c2b5a88
treea674548cc40b55b8713a43cd85694062cbdd4b11
parentbc8ace2a6d0304887add4b6b6688d87aea34cf26

std.Build.Step.Compile: clarify step name

In particular this makes it more obvious what step is compiling a unit test versus which is running it.

1 files changed, 2 insertions(+), 8 deletions(-)

lib/std/Build/Step/Compile.zig+2-8
...@@ -378,14 +378,8 @@ pub fn create(owner: *std.Build, options: Options) *Compile {...@@ -378,14 +378,8 @@ pub fn create(owner: *std.Build, options: Options) *Compile {
378 @panic("the root Module of a Compile step must be created with a known 'target' field");378 @panic("the root Module of a Compile step must be created with a known 'target' field");
379 const target = resolved_target.result;379 const target = resolved_target.result;
380380
381 const step_name = owner.fmt("{s} {s}{s} {s}", .{381 const step_name = owner.fmt("compile {s} {s}{s} {s}", .{
382 switch (options.kind) {382 @tagName(options.kind),
383 .exe => "zig build-exe",
384 .lib => "zig build-lib",
385 .obj => "zig build-obj",
386 .@"test" => "zig test",
387 .test_obj => "zig test-obj",
388 },
389 name_adjusted,383 name_adjusted,
390 @tagName(options.root_module.optimize orelse .Debug),384 @tagName(options.root_module.optimize orelse .Debug),
391 resolved_target.query.zigTriple(owner.allocator) catch @panic("OOM"),385 resolved_target.query.zigTriple(owner.allocator) catch @panic("OOM"),