# stage2: cleanups regarding red zone CLI flags · gitcafe/zig

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

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

Visibility: public

Requested revision: 5b2a79848ced20db80f3f4ce46b3ef7f4a051d53

Requested commit: 5b2a79848ced20db80f3f4ce46b3ef7f4a051d53

Commit: 5b2a79848ced20db80f3f4ce46b3ef7f4a051d53

Tree: dfdd8caf259e2d03ba89d4c0211d9cafb45c6064

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: cleanups regarding red zone CLI flags

 * CLI: change to -mred-zone and -mno-red-zone to match gcc/clang.
 * build.zig: remove the double negative and make it an optional bool.
   This follows precedent from other flags, allowing the compiler CLI to
   be the decider of what is default instead of duplicating the default
   value into the build system code.
 * Compilation: make it an optional `want_red_zone` instead of a
   `no_red_zone` bool. The default is decided by a call to
   `target_util.hasRedZone`.
 * When creating a Clang command line, put -mred-zone on the command
   line if we are forcing it to be enabled.
 * Update update_clang_options.zig with respect to the recent {s}/{} format changes.
 * `zig cc` integration with red zone preference.

```

## Parents

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

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