Skip to content

Commit

Permalink
clang: use gcc syntax to enable diagnostics color
Browse files Browse the repository at this point in the history
clang has supported gcc syntax since version 3.3.0 from 10 years ago.
It's better than its own version because it takes a "when" verb which
allows us to explicitely ask for "auto".  This is useful when overriding
flags that came from elsewhere.

Before this patch, meson was just treating b_colorout="auto" as "always".
  • Loading branch information
kiwixz authored and eli-schwartz committed Aug 8, 2023
1 parent 6671b73 commit 3de0f6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mesonbuild/compilers/mixins/clang.py
Expand Up @@ -31,9 +31,9 @@
from ...dependencies import Dependency # noqa: F401

clang_color_args: T.Dict[str, T.List[str]] = {
'auto': ['-fcolor-diagnostics'],
'always': ['-fcolor-diagnostics'],
'never': ['-fno-color-diagnostics'],
'auto': ['-fdiagnostics-color=auto'],
'always': ['-fdiagnostics-color=always'],
'never': ['-fdiagnostics-color=never'],
}

clang_optimization_args: T.Dict[str, T.List[str]] = {
Expand Down

0 comments on commit 3de0f6d

Please sign in to comment.