# std: have Builder use response files if zig build args exceed OS limits · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2bd10f4db98fd313c6743477ad36b139652a8dd5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2bd10f4db98fd313c6743477ad36b139652a8dd5

Requested commit: 2bd10f4db98fd313c6743477ad36b139652a8dd5

Commit: 2bd10f4db98fd313c6743477ad36b139652a8dd5

Tree: 9c935031ca3027b48e763a63b7fb7cd7b6f582b6

Author: Stephen Gutekanst

Committer: Stephen Gutekanst

## Message

```
std: have Builder use response files if zig build args exceed OS limits

In Mach engine we're seeing command line arguments to `zig build-lib`
exceed the 32 KiB limit that Windows imposes, due to the number of
sources and compiler flags we must pass in order to build gpu-dawn.

This change fixes the issue by having `Builder` check if the arguments
to a `zig build-*` command are >30 KiB and, if so, writes the arguments
to a file `zig-cache/args/<SHA2 of args>`. Then the command invocation
merely becomes `zig build-lib @<that file>`.

Fixes #10693

Fixes hexops/mach#167

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>

```

## Parents

- [e41d4df93cf78b7ecccd959472dc653dc089f8aa](https://git.cafe/gitcafe/zig/commit/e41d4df93cf78b7ecccd959472dc653dc089f8aa?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2bd10f4db98fd313c6743477ad36b139652a8dd5?format=markdown)
