aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-01-19 15:49:08 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-01-19 15:49:08 -0700
commit1af31baf0ba447b6ea5a1456df5ba2d82dc26e56 (patch)
treea03fbbd5250b28d63188bbeae7e83e0b0487d81d /src/Compilation.zig
parent287f640cc94d7f1cddb30e9ef57a8c921621a5b9 (diff)
downloadzig-1af31baf0ba447b6ea5a1456df5ba2d82dc26e56.tar.gz
zig-1af31baf0ba447b6ea5a1456df5ba2d82dc26e56.zip
stage2: -Dlog enables all logging, log scopes can be set at runtime
Previously you had to recompile if you wanted to change the log scopes that get printed. Now, log scopes can be set at runtime, and -Dlog controls whether all logging is available at runtime. Purpose here is a nicer development experience. Most likely stage2 developers will always want -Dlog enabled and then pass --debug-log scopes when debugging particular issues.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index ad99e40541..7700fcdc4a 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1560,6 +1560,9 @@ pub fn performAllTheWork(self: *Compilation) error{ TimerUnsupported, OutOfMemor
}
}
+ log.debug("calling updateDecl on '{s}', type={}", .{
+ decl.name, decl.typed_value.most_recent.typed_value.ty,
+ });
assert(decl.typed_value.most_recent.typed_value.ty.hasCodeGenBits());
self.bin_file.updateDecl(module, decl) catch |err| switch (err) {