diff options
| author | ruki <[email protected]> | 2024-03-25 23:40:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-25 23:40:45 +0800 |
| commit | 820d2df5f51d94daf3e44db168dfcd048c467917 (patch) | |
| tree | ba8a590798d0be6b0c2b10a72fce79d27c60bff2 /xmake/modules/core/tools/gcc.lua | |
| parent | 01166202facb2d90e4056003c0c80c4c02837c53 (diff) | |
improve color output for clang on windows
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 216898f97..ff1431934 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -575,6 +575,10 @@ function _has_color_diagnostics(self) -- for clang elseif self:has_flags("-fcolor-diagnostics", "cxflags") then colors_diagnostics = "-fcolor-diagnostics" + -- enable color output for windows, @see https://github.com/xmake-io/xmake-vscode/discussions/260 + if is_host("windows") and self:has_flags("-fansi-escape-codes", "cxflags") then + colors_diagnostics = table.join(colors_diagnostics, "-fansi-escape-codes") + end end end end |
