zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit d2650eb570c5494c728a0a780feb310abe2f1222 (tree)
parent 705e9cb3caaa049336104662a833716757ffcb4a
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 16 Feb 2023 17:19:26 -0700

CLI: detect linker color diagnostics flags

Diffstat:
Msrc/main.zig | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/main.zig b/src/main.zig @@ -2055,6 +2055,14 @@ fn buildOutputType( // This option does not do anything. } else if (mem.eql(u8, arg, "--export-all-symbols")) { rdynamic = true; + } else if (mem.eql(u8, arg, "--color-diagnostics") or + mem.eql(u8, arg, "--color-diagnostics=always")) + { + color = .on; + } else if (mem.eql(u8, arg, "--no-color-diagnostics") or + mem.eql(u8, arg, "--color-diagnostics=never")) + { + color = .off; } else if (mem.eql(u8, arg, "-s") or mem.eql(u8, arg, "--strip-all") or mem.eql(u8, arg, "-S") or mem.eql(u8, arg, "--strip-debug")) {