diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-02-28 13:32:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-03-10 17:51:05 -0700 |
| commit | 356e653f9bd52d4aebf8ef380a4dcb9de88caf06 (patch) | |
| tree | 2d9bbe94edc4b54426e9b2e6810a2244ecd4a272 /src/Compilation.zig | |
| parent | 94daf873354c64602ab564e49a686ce728052b04 (diff) | |
| download | zig-356e653f9bd52d4aebf8ef380a4dcb9de88caf06.tar.gz zig-356e653f9bd52d4aebf8ef380a4dcb9de88caf06.zip | |
better to use AST than ZIR for doc generation
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 87c400a3a0..4e2e47be5f 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -36,7 +36,6 @@ const Cache = std.Build.Cache; const c_codegen = @import("codegen/c.zig"); const libtsan = @import("libtsan.zig"); const Zir = std.zig.Zir; -const Autodoc = @import("Autodoc.zig"); const resinator = @import("resinator.zig"); const Builtin = @import("Builtin.zig"); const LlvmObject = @import("codegen/llvm.zig").Object; @@ -2347,10 +2346,6 @@ fn flush(comp: *Compilation, arena: Allocator, prog_node: *std.Progress.Node) !v try emitLlvmObject(comp, arena, default_emit, null, llvm_object, prog_node); } } - - if (comp.totalErrorCount() == 0) { - try maybeGenerateAutodocs(comp, prog_node); - } } /// This function is called by the frontend before flush(). It communicates that @@ -2401,26 +2396,6 @@ fn renameTmpIntoCache( } } -fn maybeGenerateAutodocs(comp: *Compilation, prog_node: *std.Progress.Node) !void { - const mod = comp.module orelse return; - // TODO: do this in a separate job during performAllTheWork(). The - // file copies at the end of generate() can also be extracted to - // separate jobs - if (!build_options.only_c and !build_options.only_core_functionality) { - if (comp.docs_emit) |emit| { - var dir = try emit.directory.handle.makeOpenPath(emit.sub_path, .{}); - defer dir.close(); - - var sub_prog_node = prog_node.start("Generating documentation", 0); - sub_prog_node.activate(); - sub_prog_node.context.refresh(); - defer sub_prog_node.end(); - - try Autodoc.generate(mod, dir); - } - } -} - /// Communicate the output binary location to parent Compilations. fn wholeCacheModeSetBinFilePath( comp: *Compilation, |
