diff options
| author | kcbanner <kcbanner@gmail.com> | 2023-07-25 23:29:55 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-07-26 02:20:29 -0700 |
| commit | a8a2f2b58bd6f876258bb01b370a66c31d82f330 (patch) | |
| tree | 436b43c06157e63d7f5b3cec31a932fd566a0b78 /src/main.zig | |
| parent | 6cee98eb3074fcb99297f23f30e3a230a14e8db7 (diff) | |
| download | zig-a8a2f2b58bd6f876258bb01b370a66c31d82f330.tar.gz zig-a8a2f2b58bd6f876258bb01b370a66c31d82f330.zip | |
Add --verbose-generic-instances to provide visibility on the number of generic function instantiations
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index dcc64f085c..39a7adc424 100644 --- a/src/main.zig +++ b/src/main.zig @@ -571,6 +571,7 @@ const usage_build_generic = \\ --verbose-cc Display C compiler invocations \\ --verbose-air Enable compiler debug output for Zig AIR \\ --verbose-intern-pool Enable compiler debug output for InternPool + \\ --verbose-generic-instances Enable compiler debug output for generic instance generation \\ --verbose-llvm-ir[=path] Enable compiler debug output for unoptimized LLVM IR \\ --verbose-llvm-bc=[path] Enable compiler debug output for unoptimized LLVM BC \\ --verbose-cimport Enable compiler debug output for C imports @@ -741,6 +742,7 @@ fn buildOutputType( var verbose_cc = (builtin.os.tag != .wasi or builtin.link_libc) and std.process.hasEnvVarConstant("ZIG_VERBOSE_CC"); var verbose_air = false; var verbose_intern_pool = false; + var verbose_generic_instances = false; var verbose_llvm_ir: ?[]const u8 = null; var verbose_llvm_bc: ?[]const u8 = null; var verbose_cimport = false; @@ -1469,6 +1471,8 @@ fn buildOutputType( verbose_air = true; } else if (mem.eql(u8, arg, "--verbose-intern-pool")) { verbose_intern_pool = true; + } else if (mem.eql(u8, arg, "--verbose-generic-instances")) { + verbose_generic_instances = true; } else if (mem.eql(u8, arg, "--verbose-llvm-ir")) { verbose_llvm_ir = "-"; } else if (mem.startsWith(u8, arg, "--verbose-llvm-ir=")) { @@ -3166,6 +3170,7 @@ fn buildOutputType( .verbose_link = verbose_link, .verbose_air = verbose_air, .verbose_intern_pool = verbose_intern_pool, + .verbose_generic_instances = verbose_generic_instances, .verbose_llvm_ir = verbose_llvm_ir, .verbose_llvm_bc = verbose_llvm_bc, .verbose_cimport = verbose_cimport, |
