aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/Compile.zig
diff options
context:
space:
mode:
authorxdBronch <51252236+xdBronch@users.noreply.github.com>2023-11-03 14:49:53 -0400
committerVeikka Tuominen <git@vexu.eu>2023-11-13 14:57:51 +0200
commit5de06365776687265ecf017979b33163db59e93e (patch)
tree7e002fc2fa2c114a29141eb35279d605b0af1091 /lib/std/Build/Step/Compile.zig
parentcaae40c216000be156f87c9e27cba3d0c45bb8c7 (diff)
downloadzig-5de06365776687265ecf017979b33163db59e93e.tar.gz
zig-5de06365776687265ecf017979b33163db59e93e.zip
expose to build system
Diffstat (limited to 'lib/std/Build/Step/Compile.zig')
-rw-r--r--lib/std/Build/Step/Compile.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig
index 2d08541545..d06a44c4da 100644
--- a/lib/std/Build/Step/Compile.zig
+++ b/lib/std/Build/Step/Compile.zig
@@ -221,6 +221,10 @@ generated_llvm_bc: ?*GeneratedFile,
generated_llvm_ir: ?*GeneratedFile,
generated_h: ?*GeneratedFile,
+/// The maximum number of distinct errors within a compilation step
+/// Defaults to `std.math.maxInt(u16)`
+error_limit: ?u32 = null,
+
pub const ExpectedCompileErrors = union(enum) {
contains: []const u8,
exact: []const []const u8,
@@ -2092,6 +2096,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
});
}
+ if (self.error_limit) |err_limit| try zig_args.appendSlice(&.{
+ "--error-limit",
+ b.fmt("{}", .{err_limit}),
+ });
+
try zig_args.append("--listen=-");
// Windows has an argument length limit of 32,766 characters, macOS 262,144 and Linux