diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-18 13:36:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-19 19:10:12 -0700 |
| commit | e5d21e10bc6e652a72cf22ad1b1cf8ba8692abbf (patch) | |
| tree | da12391511368c5f2821664acf07331358a6f03f /src/Compilation.zig | |
| parent | 84adbeb0773dd1375ea0d8106a0845022531110c (diff) | |
| download | zig-e5d21e10bc6e652a72cf22ad1b1cf8ba8692abbf.tar.gz zig-e5d21e10bc6e652a72cf22ad1b1cf8ba8692abbf.zip | |
Autodoc: skip docs when compile errors occur
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index d4e3c13133..ee2ed6acca 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2288,6 +2288,14 @@ pub fn update(comp: *Compilation) !void { return; } + if (comp.emit_docs) |doc_location| { + if (comp.bin_file.options.module) |module| { + var autodoc = Autodoc.init(module, doc_location); + defer autodoc.deinit(); + try autodoc.generateZirData(); + } + } + // Flush takes care of -femit-bin, but we still have -femit-llvm-ir, -femit-llvm-bc, and // -femit-asm to handle, in the case of C objects. comp.emitOthers(); @@ -2867,14 +2875,6 @@ pub fn performAllTheWork( } } - if (comp.emit_docs) |doc_location| { - if (comp.bin_file.options.module) |module| { - var autodoc = Autodoc.init(module, doc_location); - defer autodoc.deinit(); - try autodoc.generateZirData(); - } - } - if (!use_stage1) { const outdated_and_deleted_decls_frame = tracy.namedFrame("outdated_and_deleted_decls"); defer outdated_and_deleted_decls_frame.end(); |
