aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-03-28 19:42:08 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-03-28 19:42:43 -0700
commit281a7baaeac6b6b3c8c78124f5e484f7ee101cf0 (patch)
treea8ca0725a42e8940197064a4e6485e2523b9926b /src/Compilation.zig
parent8f469c11275e60f5f1a8ae08fc7596ba366eda16 (diff)
parent175adc0bd738c2e3a55bb71c6a53dcc920c203ba (diff)
downloadzig-281a7baaeac6b6b3c8c78124f5e484f7ee101cf0.tar.gz
zig-281a7baaeac6b6b3c8c78124f5e484f7ee101cf0.zip
Merge remote-tracking branch 'origin/master' into zir-memory-layout
Wanted to make sure those new test cases still pass. Also grab that CI fix so we can get those green check marks.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index e7dded68cd..b086e513b9 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -3188,7 +3188,11 @@ fn updateStage1Module(comp: *Compilation, main_progress_node: *std.Progress.Node
id_symlink_basename,
&prev_digest_buf,
) catch |err| blk: {
- log.debug("stage1 {s} new_digest={} error: {s}", .{ mod.root_pkg.root_src_path, digest, @errorName(err) });
+ log.debug("stage1 {s} new_digest={s} error: {s}", .{
+ mod.root_pkg.root_src_path,
+ std.fmt.fmtSliceHexLower(&digest),
+ @errorName(err),
+ });
// Handle this as a cache miss.
break :blk prev_digest_buf[0..0];
};
@@ -3196,10 +3200,13 @@ fn updateStage1Module(comp: *Compilation, main_progress_node: *std.Progress.Node
if (!mem.eql(u8, prev_digest[0..digest.len], &digest))
break :hit;
- log.debug("stage1 {s} digest={} match - skipping invocation", .{ mod.root_pkg.root_src_path, digest });
+ log.debug("stage1 {s} digest={s} match - skipping invocation", .{
+ mod.root_pkg.root_src_path,
+ std.fmt.fmtSliceHexLower(&digest),
+ });
var flags_bytes: [1]u8 = undefined;
_ = std.fmt.hexToBytes(&flags_bytes, prev_digest[digest.len..]) catch {
- log.warn("bad cache stage1 digest: '{s}'", .{prev_digest});
+ log.warn("bad cache stage1 digest: '{s}'", .{std.fmt.fmtSliceHexLower(prev_digest)});
break :hit;
};
@@ -3219,7 +3226,11 @@ fn updateStage1Module(comp: *Compilation, main_progress_node: *std.Progress.Node
mod.stage1_flags = @bitCast(@TypeOf(mod.stage1_flags), flags_bytes[0]);
return;
}
- log.debug("stage1 {s} prev_digest={} new_digest={}", .{ mod.root_pkg.root_src_path, prev_digest, digest });
+ log.debug("stage1 {s} prev_digest={s} new_digest={s}", .{
+ mod.root_pkg.root_src_path,
+ std.fmt.fmtSliceHexLower(prev_digest),
+ std.fmt.fmtSliceHexLower(&digest),
+ });
man.unhit(prev_hash_state, input_file_count);
}
@@ -3366,8 +3377,8 @@ fn updateStage1Module(comp: *Compilation, main_progress_node: *std.Progress.Node
// Update the small file with the digest. If it fails we can continue; it only
// means that the next invocation will have an unnecessary cache miss.
const stage1_flags_byte = @bitCast(u8, mod.stage1_flags);
- log.debug("stage1 {s} final digest={} flags={x}", .{
- mod.root_pkg.root_src_path, digest, stage1_flags_byte,
+ log.debug("stage1 {s} final digest={s} flags={x}", .{
+ mod.root_pkg.root_src_path, std.fmt.fmtSliceHexLower(&digest), stage1_flags_byte,
});
var digest_plus_flags: [digest.len + 2]u8 = undefined;
digest_plus_flags[0..digest.len].* = digest;