| ... | ... | @@ -163,7 +163,6 @@ pub fn main(init: process.Init.Minimal) !void { |
| 163 | 163 | |
| 164 | 164 | var arena_instance: std.heap.ArenaAllocator = .init(std.heap.page_allocator); |
| 165 | 165 | defer arena_instance.deinit(); |
| 166 | | defer if (debugMakerLeaks()) log.debug("used {Bi} of arena", .{arena_instance.queryCapacity()}); |
| 167 | 166 | const arena = arena_instance.allocator(); |
| 168 | 167 | |
| 169 | 168 | const args = try init.args.toSlice(arena); |
| ... | ... | @@ -444,8 +443,6 @@ pub fn main(init: process.Init.Minimal) !void { |
| 444 | 443 | } else if (mem.cutPrefix(u8, arg, "--debug-rt=")) |rest| { |
| 445 | 444 | graph.debug_compiler_runtime_libs = stringToEnum(std.lang.Optimize, rest) orelse |
| 446 | 445 | fatal("unrecognized optimization mode: {s}", .{rest}); |
| 447 | | } else if (is_debug_mode and mem.eql(u8, arg, "--debug-maker-leaks")) { |
| 448 | | debug_maker_leaks = true; |
| 449 | 446 | } else if (mem.eql(u8, arg, "--libc-runtimes") or mem.eql(u8, arg, "--glibc-runtimes")) { |
| 450 | 447 | // --glibc-runtimes was the old name of the flag; kept for compatibility for now. |
| 451 | 448 | graph.libc_runtimes_dir = nextArgOrFatal(args, &arg_i); |
| ... | ... | @@ -819,10 +816,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 819 | 816 | .message => |payload| { |
| 820 | 817 | const header: Client.Message.Header = try payload; |
| 821 | 818 | switch (header.tag) { |
| 822 | | .exit => { |
| 823 | | cleanExit(io, &scanned_config); |
| 824 | | process.exit(0); |
| 825 | | }, |
| 819 | .exit => return cleanExit(io, &scanned_config), |
| 826 | 820 | .bsp_build_steps => { |
| 827 | 821 | // Cancel existing file watching |
| 828 | 822 | select.cancelDiscard(); |
| ... | ... | @@ -2550,8 +2544,7 @@ fn makeSteps( |
| 2550 | 2544 | break :code 2; // failure; do not print build command |
| 2551 | 2545 | }; |
| 2552 | 2546 | if (code == 0) { |
| 2553 | | removePoisonedConfiguration(io, maker.scanned_config); |
| 2554 | | if (debugMakerLeaks()) return; |
| 2547 | return cleanExit(io, maker.scanned_config); |
| 2555 | 2548 | } |
| 2556 | 2549 | cleanup_task.await(io); // There is a defer above but an exit below. |
| 2557 | 2550 | _ = io.lockStderr(&.{}, graph.stderr_mode) catch {}; |
| ... | ... | @@ -3639,11 +3632,6 @@ fn removePoisonedConfiguration(io: Io, scanned_config: *const ScannedConfig) voi |
| 3639 | 3632 | } |
| 3640 | 3633 | } |
| 3641 | 3634 | |
| 3642 | | inline fn debugMakerLeaks() bool { |
| 3643 | | if (!is_debug_mode) return false; |
| 3644 | | return debug_maker_leaks; |
| 3645 | | } |
| 3646 | | |
| 3647 | 3635 | const BuildRoot = struct { |
| 3648 | 3636 | directory: Cache.Directory, |
| 3649 | 3637 | close_directory: bool, |