| author | |
| committer | |
| log | e8fa19960243a99cef5d9af94c3db52173787a4e |
| tree | ce9216bc3b770fd91c33579fe1a6f45ab8243141 |
| parent | 575a7cccc0d9da542bd611f73e570d840f261bf5 |
* Allow calling it multiple times.
* Rename it. Sorry, this is to coincide with #16353.2 files changed, 3 insertions(+), 3 deletions(-)
build.zig+1-1| ... | ... | @@ -61,7 +61,7 @@ pub fn build(b: *std.Build) !void { |
| 61 | 61 | autodoc_test.overrideZigLibDir("lib"); |
| 62 | 62 | autodoc_test.emit_bin = .no_emit; // https://github.com/ziglang/zig/issues/16351 |
| 63 | 63 | const install_std_docs = b.addInstallDirectory(.{ |
| 64 | .source_dir = autodoc_test.getOutputDocs(), | |
| 64 | .source_dir = autodoc_test.getEmittedDocs(), | |
| 65 | 65 | .install_dir = .prefix, |
| 66 | 66 | .install_subdir = "doc/std", |
| 67 | 67 | }); |
lib/std/Build/Step/Compile.zig+2-2| ... | ... | @@ -1004,8 +1004,8 @@ pub fn getOutputPdbSource(self: *Compile) FileSource { |
| 1004 | 1004 | return .{ .generated = &self.output_pdb_path_source }; |
| 1005 | 1005 | } |
| 1006 | 1006 | |
| 1007 | pub fn getOutputDocs(self: *Compile) FileSource { | |
| 1008 | assert(self.generated_docs == null); // This function may only be called once. | |
| 1007 | pub fn getEmittedDocs(self: *Compile) FileSource { | |
| 1008 | if (self.generated_docs) |g| return .{ .generated = g }; | |
| 1009 | 1009 | const arena = self.step.owner.allocator; |
| 1010 | 1010 | const generated_file = arena.create(GeneratedFile) catch @panic("OOM"); |
| 1011 | 1011 | generated_file.* = .{ .step = &self.step }; |