aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-04-17 04:06:51 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-04-17 04:09:35 -0700
commita7c05c06bef1570546cae4c45a76027819c7fa09 (patch)
tree80ae95c7d5edf95f4ed8ed013eb0bf9e27e337fb /src/codegen
parent2aeaa1cfc4c563a24525fb27fd2783bfd5da808a (diff)
downloadzig-a7c05c06bef1570546cae4c45a76027819c7fa09.tar.gz
zig-a7c05c06bef1570546cae4c45a76027819c7fa09.zip
stage2: expose progress bar API to linker backends
This gives us insight as to what is happening when we are waiting for things such as LLVM emit object and LLD linking.
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 364cccf335..cdb9addcff 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -469,7 +469,12 @@ pub const Object = struct {
_ = builder.buildRet(is_lt);
}
- pub fn flushModule(self: *Object, comp: *Compilation) !void {
+ pub fn flushModule(self: *Object, comp: *Compilation, prog_node: *std.Progress.Node) !void {
+ var sub_prog_node = prog_node.start("LLVM Emit Object", 0);
+ sub_prog_node.activate();
+ sub_prog_node.context.refresh();
+ defer sub_prog_node.end();
+
try self.genErrorNameTable(comp);
try self.genCmpLtErrorsLenFunction(comp);