diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-11-30 19:14:04 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-11-30 19:14:04 +0200 |
| commit | e4fd9acc2a7682d0d64d6d42e2882967cf3877aa (patch) | |
| tree | 420f1acf1527afdcda62e9878342c0cc3533bde2 /lib/std/build.zig | |
| parent | fba33ee58cc3dcd832fe9422be4dc05228afce76 (diff) | |
| download | zig-e4fd9acc2a7682d0d64d6d42e2882967cf3877aa.tar.gz zig-e4fd9acc2a7682d0d64d6d42e2882967cf3877aa.zip | |
CLI: allow using `--debug-compile-errors` with `zig build`
Diffstat (limited to 'lib/std/build.zig')
| -rw-r--r-- | lib/std/build.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index 9169bcf3d0..1320e749a2 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -72,6 +72,7 @@ pub const Builder = struct { pkg_config_pkg_list: ?(PkgConfigError![]const PkgConfigPkg) = null, args: ?[][]const u8 = null, debug_log_scopes: []const []const u8 = &.{}, + debug_compile_errors: bool = false, /// Experimental. Use system Darling installation to run cross compiled macOS build artifacts. enable_darling: bool = false, @@ -2686,6 +2687,10 @@ pub const LibExeObjStep = struct { try zig_args.append(log_scope); } + if (builder.debug_compile_errors) { + try zig_args.append("--debug-compile-errors"); + } + if (builder.verbose_cimport) zig_args.append("--verbose-cimport") catch unreachable; if (builder.verbose_air) zig_args.append("--verbose-air") catch unreachable; if (builder.verbose_llvm_ir) zig_args.append("--verbose-llvm-ir") catch unreachable; |
