diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig index 47a0211a069f440d2e8953346f5998dd7f62ee38..c9e739d53e136496c0c8e6aa33d1cb3eeaf4a5fc 100644 --- a/lib/compiler/Maker.zig +++ b/lib/compiler/Maker.zig @@ -1237,6 +1237,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig { .cache_manifest = &config_man, .arch_os_abi = target_arch_os_abi, .progress_node = compile_prog_node, + .skip_log_cmdline_on_compile_errors = !graph.verbose, })) |r| r.path else |err| return err; defer gpa.free(configure_exe_path.sub_path); diff --git a/lib/std/zig.zig b/lib/std/zig.zig index 4ab3364d6e2e6421ba7ccc66a23d6c5895583341..52e5f6c2608fce8fc49ccff006d786da91a6775e 100644 --- a/lib/std/zig.zig +++ b/lib/std/zig.zig @@ -1637,6 +1637,7 @@ pub const BuildExeSubprocessOptions = struct { arch_os_abi: ?[]const u8 = null, cpu_features: ?[]const u8 = null, progress_node: std.Progress.Node = .none, + skip_log_cmdline_on_compile_errors: bool = false, }; pub const BuildExeSubprocessError = error{ @@ -1820,7 +1821,9 @@ pub fn buildExeSubprocess( return error.AlreadyReported; }, }; - log.err("command reported {d} compilation errors: {f}", .{ result_error_bundle.errorMessageCount(), cmd }); + if (!options.skip_log_cmdline_on_compile_errors) log.err("command reported {d} compilation errors: {f}", .{ + result_error_bundle.errorMessageCount(), cmd, + }); if (received_fs_inputs) return error.FailedButCacheIntact; return error.AlreadyReported; }