Skip to content

Commit 206ebf8

Browse files
committed
Compilation: fix -femit-docs
1 parent e3901c6 commit 206ebf8

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/Compilation.zig

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4275,8 +4275,29 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) anye
42754275
.cc_argv = &.{},
42764276
.parent = null,
42774277
.builtin_mod = null,
4278-
.builtin_modules = null, // there is only one module in this compilation
4278+
.builtin_modules = null,
4279+
});
4280+
const walk_mod = try Package.Module.create(arena, .{
4281+
.global_cache_directory = comp.global_cache_directory,
4282+
.paths = .{
4283+
.root = .{
4284+
.root_dir = comp.zig_lib_directory,
4285+
.sub_path = "docs/wasm",
4286+
},
4287+
.root_src_path = "Walk.zig",
4288+
},
4289+
.fully_qualified_name = "Walk",
4290+
.inherited = .{
4291+
.resolved_target = resolved_target,
4292+
.optimize_mode = optimize_mode,
4293+
},
4294+
.global = config,
4295+
.cc_argv = &.{},
4296+
.parent = root_mod,
4297+
.builtin_mod = root_mod.getBuiltinDependency(),
4298+
.builtin_modules = null, // `builtin_mod` is set
42794299
});
4300+
try root_mod.deps.put(arena, "Walk", walk_mod);
42804301
const bin_basename = try std.zig.binNameAlloc(arena, .{
42814302
.root_name = root_name,
42824303
.target = resolved_target.result,

0 commit comments

Comments
 (0)