build: spend a lot less time generating std docs

This commit is contained in:
Andrew Kelley 2024-03-06 22:51:38 -07:00
parent 8b70e4f2c9
commit c2e978f04f

View file

@ -55,10 +55,12 @@ pub fn build(b: *std.Build) !void {
b.getInstallStep().dependOn(&install_langref.step); b.getInstallStep().dependOn(&install_langref.step);
} }
const autodoc_test = b.addTest(.{ const autodoc_test = b.addObject(.{
.name = "std",
.root_source_file = .{ .path = "lib/std/std.zig" }, .root_source_file = .{ .path = "lib/std/std.zig" },
.target = target, .target = target,
.zig_lib_dir = .{ .path = "lib" }, .zig_lib_dir = .{ .path = "lib" },
.optimize = .Debug,
}); });
const install_std_docs = b.addInstallDirectory(.{ const install_std_docs = b.addInstallDirectory(.{
.source_dir = autodoc_test.getEmittedDocs(), .source_dir = autodoc_test.getEmittedDocs(),