| author | |
| committer | |
| log | 74b018ceb3822e0810ddfe434605bee69aba8b73 |
| tree | bfd7767a5ec8ced32f9b870724832f9298a7f599 |
| parent | 174532c78e254449c61d1729f8761b30b6f05eff |
still overridable by individual Compile steps4 files changed, 9 insertions(+), 3 deletions(-)
lib/compiler/Maker.zig+5| ... | ... | @@ -390,6 +390,10 @@ pub fn main(init: process.Init.Minimal) !void { |
| 390 | 390 | fatal("unable to parse reference_trace count {q}: {t}", .{ num, err }); |
| 391 | 391 | } else if (mem.eql(u8, arg, "-fno-reference-trace")) { |
| 392 | 392 | graph.reference_trace = null; |
| 393 | } else if (mem.eql(u8, arg, "--error-limit")) { | |
| 394 | const next_arg = nextArgOrFatal(args, &arg_idx); | |
| 395 | graph.error_limit = std.fmt.parseUnsigned(u32, next_arg, 0) catch |err| | |
| 396 | fatal("unable to parse error limit {q}: {t}", .{ next_arg, err }); | |
| 393 | 397 | } else if (mem.cutPrefix(u8, arg, "-j")) |text| { |
| 394 | 398 | const n = std.fmt.parseUnsigned(u32, text, 10) catch |err| |
| 395 | 399 | fatal("unable to parse jobs count {q}: {t}", .{ text, err }); |
| ... | ... | @@ -1838,6 +1842,7 @@ const ScannedConfig = struct { |
| 1838 | 1842 | \\ -fno-reference-trace Disable reference trace |
| 1839 | 1843 | \\ -fallow-so-scripts Allows .so files to be GNU ld scripts |
| 1840 | 1844 | \\ -fno-allow-so-scripts (default) .so files must be ELF files |
| 1845 | \\ --error-limit [num] Set the maximum amount of distinct error values | |
| 1841 | 1846 | \\ --build-file [file] Override path to build.zig |
| 1842 | 1847 | \\ --cache-dir [path] Override path to local Zig cache directory |
| 1843 | 1848 | \\ --global-cache-dir [path] Override path to global Zig cache directory |
lib/compiler/Maker/Graph.zig+1| ... | ... | @@ -43,3 +43,4 @@ libc_file: ?[]const u8 = null, |
| 43 | 43 | sysroot: ?[]const u8 = null, |
| 44 | 44 | search_prefixes: std.ArrayList([]const u8) = .empty, |
| 45 | 45 | build_id: ?std.zig.BuildId = null, |
| 46 | error_limit: ?u32 = null, |
lib/compiler/Maker/Step/Compile.zig+1-1| ... | ... | @@ -759,7 +759,7 @@ fn lowerZigArgs( |
| 759 | 759 | try zig_args.append(gpa, "-municode"); |
| 760 | 760 | } |
| 761 | 761 | |
| 762 | if (compile.error_limit) |err_limit| try zig_args.appendSlice(gpa, &.{ | |
| 762 | if (compile.error_limit orelse graph.error_limit) |err_limit| try zig_args.appendSlice(gpa, &.{ | |
| 763 | 763 | "--error-limit", try allocPrint(arena, "{d}", .{err_limit}), |
| 764 | 764 | }); |
| 765 | 765 |
lib/std/Build/Step/Compile.zig+2-2| ... | ... | @@ -224,8 +224,8 @@ generated_llvm_bc: ?*GeneratedFile, |
| 224 | 224 | generated_llvm_ir: ?*GeneratedFile, |
| 225 | 225 | generated_h: ?*GeneratedFile, |
| 226 | 226 | |
| 227 | /// The maximum number of distinct errors within a compilation step | |
| 228 | /// Defaults to `std.math.maxInt(u16)` | |
| 227 | /// The maximum number of distinct errors within a compilation step Defaults to | |
| 228 | /// `std.math.maxInt(u16)`. Overrides the argument passed to `zig build`. | |
| 229 | 229 | error_limit: ?u32 = null, |
| 230 | 230 | |
| 231 | 231 | /// Computed during make(). |