authorgravatar for 51252236+xdBronch@users.noreply.github.comxdBronch <51252236+xdBronch@users.noreply.github.com> 2023-11-03 14:49:53-04:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-11-13 14:57:51+02:00
log5de06365776687265ecf017979b33163db59e93e
tree7e002fc2fa2c114a29141eb35279d605b0af1091
parentcaae40c216000be156f87c9e27cba3d0c45bb8c7

expose to build system


1 files changed, 9 insertions(+), 0 deletions(-)

lib/std/Build/Step/Compile.zig+9
...@@ -221,6 +221,10 @@ generated_llvm_bc: ?*GeneratedFile,...@@ -221,6 +221,10 @@ generated_llvm_bc: ?*GeneratedFile,
221generated_llvm_ir: ?*GeneratedFile,221generated_llvm_ir: ?*GeneratedFile,
222generated_h: ?*GeneratedFile,222generated_h: ?*GeneratedFile,
223223
224/// The maximum number of distinct errors within a compilation step
225/// Defaults to `std.math.maxInt(u16)`
226error_limit: ?u32 = null,
227
224pub const ExpectedCompileErrors = union(enum) {228pub const ExpectedCompileErrors = union(enum) {
225 contains: []const u8,229 contains: []const u8,
226 exact: []const []const u8,230 exact: []const []const u8,
...@@ -2092,6 +2096,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {...@@ -2092,6 +2096,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
2092 });2096 });
2093 }2097 }
20942098
2099 if (self.error_limit) |err_limit| try zig_args.appendSlice(&.{
2100 "--error-limit",
2101 b.fmt("{}", .{err_limit}),
2102 });
2103
2095 try zig_args.append("--listen=-");2104 try zig_args.append("--listen=-");
20962105
2097 // Windows has an argument length limit of 32,766 characters, macOS 262,144 and Linux2106 // Windows has an argument length limit of 32,766 characters, macOS 262,144 and Linux