| ... | @@ -163,7 +163,6 @@ pub fn main(init: std.process.Init) !void { | ... | @@ -163,7 +163,6 @@ pub fn main(init: std.process.Init) !void { |
| 163 | "--global-cache-dir", | 163 | "--global-cache-dir", |
| 164 | ".global-cache", | 164 | ".global-cache", |
| 165 | }); | 165 | }); |
| 166 | try child_args.append(arena, "--listen=-"); | | |
| 167 | | 166 | |
| 168 | if (opt_resolved_lib_dir) |resolved_lib_dir| { | 167 | if (opt_resolved_lib_dir) |resolved_lib_dir| { |
| 169 | try child_args.appendSlice(arena, &.{ "--zig-lib-dir", resolved_lib_dir }); | 168 | try child_args.appendSlice(arena, &.{ "--zig-lib-dir", resolved_lib_dir }); |
| ... | @@ -187,6 +186,7 @@ pub fn main(init: std.process.Init) !void { | ... | @@ -187,6 +186,7 @@ pub fn main(init: std.process.Init) !void { |
| 187 | for (case.modules) |mod| { | 186 | for (case.modules) |mod| { |
| 188 | try child_args.append(arena, try std.fmt.allocPrint(arena, "-M{s}={s}", .{ mod.name, mod.file })); | 187 | try child_args.append(arena, try std.fmt.allocPrint(arena, "-M{s}={s}", .{ mod.name, mod.file })); |
| 189 | } | 188 | } |
| | 189 | try child_args.append(arena, "--listen=-"); |
| 190 | | 190 | |
| 191 | const zig_prog_node = prog_node.start("zig", 0); | 191 | const zig_prog_node = prog_node.start("zig", 0); |
| 192 | defer zig_prog_node.end(); | 192 | defer zig_prog_node.end(); |
| ... | @@ -210,6 +210,16 @@ pub fn main(init: std.process.Init) !void { | ... | @@ -210,6 +210,16 @@ pub fn main(init: std.process.Init) !void { |
| 210 | try cc_child_args.append(arena, "-o"); | 210 | try cc_child_args.append(arena, "-o"); |
| 211 | } | 211 | } |
| 212 | | 212 | |
| | 213 | const allow_compiler_stderr = debug_log_args.items.len != 0; |
| | 214 | |
| | 215 | if (allow_compiler_stderr) { |
| | 216 | const cmd: std.zig.SubprocessCommand = .{ |
| | 217 | .argv = child_args.items, |
| | 218 | .cwd = tmp_dir_path, |
| | 219 | }; |
| | 220 | std.log.scoped(.spawn).info("{f}", .{cmd}); |
| | 221 | } |
| | 222 | |
| 213 | var child = try std.process.spawn(io, .{ | 223 | var child = try std.process.spawn(io, .{ |
| 214 | .argv = child_args.items, | 224 | .argv = child_args.items, |
| 215 | .stdin = .pipe, | 225 | .stdin = .pipe, |
| ... | @@ -233,7 +243,7 @@ pub fn main(init: std.process.Init) !void { | ... | @@ -233,7 +243,7 @@ pub fn main(init: std.process.Init) !void { |
| 233 | .tmp_dir = tmp_dir, | 243 | .tmp_dir = tmp_dir, |
| 234 | .tmp_dir_path = tmp_dir_path, | 244 | .tmp_dir_path = tmp_dir_path, |
| 235 | .child = &child, | 245 | .child = &child, |
| 236 | .allow_compiler_stderr = debug_log_args.items.len != 0, | 246 | .allow_compiler_stderr = allow_compiler_stderr, |
| 237 | .quiet = quiet, | 247 | .quiet = quiet, |
| 238 | .preserve_tmp_on_fatal = preserve_tmp, | 248 | .preserve_tmp_on_fatal = preserve_tmp, |
| 239 | .cc_child_args = &cc_child_args, | 249 | .cc_child_args = &cc_child_args, |