From ca77c3bacc971b92f4fcfc783224af51d16174bd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 18 Dec 2023 18:18:02 -0700 Subject: [PATCH] std.Build.Step.Compile: restore previous step name Print using the target query rather than the resolved target. This makes it print "native" when compiling for the native target. --- lib/std/Build/Step/Compile.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index a984b16189..683648856a 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -251,7 +251,8 @@ pub fn create(owner: *std.Build, options: Options) *Compile { else owner.fmt("{s} ", .{name}); - const target = options.root_module.target.?.result; + const resolved_target = options.root_module.target.?; + const target = resolved_target.result; const step_name = owner.fmt("{s} {s}{s} {s}", .{ switch (options.kind) { @@ -262,7 +263,7 @@ pub fn create(owner: *std.Build, options: Options) *Compile { }, name_adjusted, @tagName(options.root_module.optimize orelse .Debug), - target.zigTriple(owner.allocator) catch @panic("OOM"), + resolved_target.query.zigTriple(owner.allocator) catch @panic("OOM"), }); const out_filename = std.zig.binNameAlloc(owner.allocator, .{