| ... | ... | @@ -310,8 +310,20 @@ pub fn create(owner: *std.Build, options: Options) *CompileStep { |
| 310 | 310 | panic("invalid name: '{s}'. It looks like a file path, but it is supposed to be the library or application name.", .{name}); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | | const step_name = owner.fmt("compile {s} {s} {s}", .{ |
| 314 | | name, |
| 313 | // Avoid the common case of the step name looking like "zig test test". |
| 314 | const name_adjusted = if (options.kind == .@"test" and mem.eql(u8, name, "test")) |
| 315 | "" |
| 316 | else |
| 317 | owner.fmt("{s} ", .{name}); |
| 318 | |
| 319 | const step_name = owner.fmt("{s} {s}{s} {s}", .{ |
| 320 | switch (options.kind) { |
| 321 | .exe => "zig build-exe", |
| 322 | .lib => "zig build-lib", |
| 323 | .obj => "zig build-obj", |
| 324 | .test_exe, .@"test" => "zig test", |
| 325 | }, |
| 326 | name_adjusted, |
| 315 | 327 | @tagName(options.optimize), |
| 316 | 328 | options.target.zigTriple(owner.allocator) catch @panic("OOM"), |
| 317 | 329 | }); |