Commit 9c1c4747f4

Stephen Gutekanst <stephen@hexops.com>
2022-02-21 20:58:13
std: Builder: account for null term considering response files
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
1 parent fb61db1
Changed files (1)
lib
lib/std/build.zig
@@ -2901,7 +2901,7 @@ pub const LibExeObjStep = struct {
             // pass that to zig, e.g. via 'zig build-lib @args.rsp'
             var args_length: usize = 0;
             for (zig_args.items) |arg| {
-                args_length += arg.len;
+                args_length += arg.len + 1; // +1 to account for null terminator
             }
             if (args_length >= 30 * 1024) {
                 const args_dir = try fs.path.join(