diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-05-24 22:25:17 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-05-25 04:43:43 +0100 |
| commit | aeed5f9ebd02b376411f3ee82dd3222f9c3b6e85 (patch) | |
| tree | 94dbee0a2039f286612c069b965f0875783121ba /lib/std/Build | |
| parent | 35ba8d95a1afd0bebba3c32cf68990f5129fabfe (diff) | |
| download | zig-aeed5f9ebd02b376411f3ee82dd3222f9c3b6e85.tar.gz zig-aeed5f9ebd02b376411f3ee82dd3222f9c3b6e85.zip | |
compiler: introduce incremental debug server
In a compiler built with debug extensions, pass `--debug-incremental` to
spawn the "incremental debug server". This is a TCP server exposing a
REPL which allows querying a bunch of compiler state, some of which is
stored only when that flag is passed. Eventually, this will probably
move into `std.zig.Server`/`std.zig.Client`, but this is easier to work
with right now. The easiest way to interact with the server is `telnet`.
Diffstat (limited to 'lib/std/Build')
| -rw-r--r-- | lib/std/Build/Step/Compile.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index 066167905d..7e8b782932 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -1447,6 +1447,10 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 { try zig_args.append("--debug-compile-errors"); } + if (b.debug_incremental) { + try zig_args.append("--debug-incremental"); + } + if (b.verbose_cimport) try zig_args.append("--verbose-cimport"); if (b.verbose_air) try zig_args.append("--verbose-air"); if (b.verbose_llvm_ir) |path| try zig_args.append(b.fmt("--verbose-llvm-ir={s}", .{path})); |
