diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-11-02 13:55:24 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-11-03 20:05:32 -0700 |
| commit | f8c24c2cd012a93fd005480411bf0936933e2fbb (patch) | |
| tree | d47f5395d87152d704524bd80e7365c7ba3e10f1 /src/main.zig | |
| parent | 1ccc68f307d4a2208118a8798d43119d63b53e05 (diff) | |
| download | zig-f8c24c2cd012a93fd005480411bf0936933e2fbb.tar.gz zig-f8c24c2cd012a93fd005480411bf0936933e2fbb.zip | |
add zig reduce subcommand
Also adds `-Donly-reduce` flag in build.zig which disables LLVM and
irrelevant code for faster iteration cycles.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index cbc7283eef..d52fcebeae 100644 --- a/src/main.zig +++ b/src/main.zig @@ -212,6 +212,14 @@ pub fn main() anyerror!void { } } + if (build_options.only_reduce) { + if (mem.eql(u8, args[1], "reduce")) { + return @import("reduce.zig").main(gpa, arena, args); + } else { + @panic("only reduce is supported in a -Donly-reduce build"); + } + } + return mainArgs(gpa, arena, args); } |
