diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-21 17:07:18 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-21 17:07:18 -0700 |
| commit | 96e5f661bd34d98bba89bcb70c9db059aaf38641 (patch) | |
| tree | a33fe1d585b30e430175ae108c9e355d983cbc6b /src | |
| parent | ceeb230c23e0665811956657157561170be54519 (diff) | |
| download | zig-96e5f661bd34d98bba89bcb70c9db059aaf38641.tar.gz zig-96e5f661bd34d98bba89bcb70c9db059aaf38641.zip | |
zig cc: add -fcolor-diagnostics and -fcaret-diagnostics integration
Closes #6290
Diffstat (limited to 'src')
| -rw-r--r-- | src/clang_options_data.zig | 36 | ||||
| -rw-r--r-- | src/main.zig | 8 |
2 files changed, 38 insertions, 6 deletions
diff --git a/src/clang_options_data.zig b/src/clang_options_data.zig index 3829493f5c..703e74416b 100644 --- a/src/clang_options_data.zig +++ b/src/clang_options_data.zig @@ -2569,12 +2569,26 @@ flagpd1("fcall-saved-x18"), flagpd1("fcall-saved-x8"), flagpd1("fcall-saved-x9"), flagpd1("fcaller-saves"), -flagpd1("fcaret-diagnostics"), +.{ + .name = "fcaret-diagnostics", + .syntax = .flag, + .zig_equivalent = .color_diagnostics, + .pd1 = true, + .pd2 = false, + .psl = false, +}, sepd1("fcaret-diagnostics-max-lines"), flagpd1("fcf-protection"), flagpd1("fchar8_t"), flagpd1("fcheck-array-temporaries"), -flagpd1("fcolor-diagnostics"), +.{ + .name = "fcolor-diagnostics", + .syntax = .flag, + .zig_equivalent = .color_diagnostics, + .pd1 = true, + .pd2 = false, + .psl = false, +}, flagpd1("fcommon"), flagpd1("fcompatibility-qualified-id-block-type-checking"), flagpd1("fcomplete-member-pointers"), @@ -2937,10 +2951,24 @@ flagpd1("fno-bounds-check"), flagpd1("fno-branch-count-reg"), flagpd1("fno-builtin"), flagpd1("fno-caller-saves"), -flagpd1("fno-caret-diagnostics"), +.{ + .name = "fno-caret-diagnostics", + .syntax = .flag, + .zig_equivalent = .no_color_diagnostics, + .pd1 = true, + .pd2 = false, + .psl = false, +}, flagpd1("fno-char8_t"), flagpd1("fno-check-array-temporaries"), -flagpd1("fno-color-diagnostics"), +.{ + .name = "fno-color-diagnostics", + .syntax = .flag, + .zig_equivalent = .no_color_diagnostics, + .pd1 = true, + .pd2 = false, + .psl = false, +}, flagpd1("fno-common"), flagpd1("fno-complete-member-pointers"), flagpd1("fno-concept-satisfaction-caching"), diff --git a/src/main.zig b/src/main.zig index d4c40e60e1..3479e1cac3 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1292,6 +1292,8 @@ fn buildOutputType( .no_omit_frame_pointer => omit_frame_pointer = false, .function_sections => function_sections = true, .no_function_sections => function_sections = false, + .color_diagnostics => color = .on, + .no_color_diagnostics => color = .off, .unwind_tables => want_unwind_tables = true, .no_unwind_tables => want_unwind_tables = false, .nostdlib => ensure_libc_on_non_freestanding = false, @@ -3820,11 +3822,13 @@ pub const ClangArgIterator = struct { no_red_zone, omit_frame_pointer, no_omit_frame_pointer, + function_sections, + no_function_sections, + color_diagnostics, + no_color_diagnostics, strip, exec_model, emit_llvm, - function_sections, - no_function_sections, }; const Args = struct { |
