diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-08-07 11:55:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-07 11:55:30 -0700 |
| commit | 0e99f517f2a1c8c19d7350a221539521b365230e (patch) | |
| tree | f487716661a5771d7c41f45106bf264da1ea133f /src | |
| parent | f9f894200891c8af6ce3a3ad222cd0bf1ee15587 (diff) | |
| parent | d721d9af69220c059a7be825d295a0b53081c4a0 (diff) | |
| download | zig-0e99f517f2a1c8c19d7350a221539521b365230e.tar.gz zig-0e99f517f2a1c8c19d7350a221539521b365230e.zip | |
Merge pull request #20958 from ziglang/fuzz
introduce a fuzz testing web interface
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 8c9e18bc98..1fd2380137 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -4201,10 +4201,11 @@ fn workerDocsWasm(comp: *Compilation, parent_prog_node: std.Progress.Node) void const prog_node = parent_prog_node.start("Compile Autodocs", 0); defer prog_node.end(); - workerDocsWasmFallible(comp, prog_node) catch |err| { - comp.lockAndSetMiscFailure(.docs_wasm, "unable to build autodocs: {s}", .{ + workerDocsWasmFallible(comp, prog_node) catch |err| switch (err) { + error.SubCompilationFailed => return, // error reported already + else => comp.lockAndSetMiscFailure(.docs_wasm, "unable to build autodocs: {s}", .{ @errorName(err), - }); + }), }; } @@ -4274,8 +4275,29 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) anye .cc_argv = &.{}, .parent = null, .builtin_mod = null, - .builtin_modules = null, // there is only one module in this compilation + .builtin_modules = null, + }); + const walk_mod = try Package.Module.create(arena, .{ + .global_cache_directory = comp.global_cache_directory, + .paths = .{ + .root = .{ + .root_dir = comp.zig_lib_directory, + .sub_path = "docs/wasm", + }, + .root_src_path = "Walk.zig", + }, + .fully_qualified_name = "Walk", + .inherited = .{ + .resolved_target = resolved_target, + .optimize_mode = optimize_mode, + }, + .global = config, + .cc_argv = &.{}, + .parent = root_mod, + .builtin_mod = root_mod.getBuiltinDependency(), + .builtin_modules = null, // `builtin_mod` is set }); + try root_mod.deps.put(arena, "Walk", walk_mod); const bin_basename = try std.zig.binNameAlloc(arena, .{ .root_name = root_name, .target = resolved_target.result, |
