summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-20 23:49:42 +0800
committerruki <[email protected]>2020-02-20 16:58:16 +0800
commit6cb8b7ca86ed9f9eb86cc0a5c48c752331efb420 (patch)
tree46290bf84c24477db85d2e0616016bfde10dad9e
parentc5a55e09577b6d88b5bb51b17012e12ec935e12a (diff)
enable color8 for gcc/clang diagnostics
-rw-r--r--xmake/modules/core/tools/gcc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index a32311454..105cc3ad1 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -360,7 +360,7 @@ end
function _has_color_diagnostics(self)
local colors_diagnostics = _g._HAS_COLOR_DIAGNOSTICS
if colors_diagnostics == nil then
- if io.isatty() and colors.color256() then
+ if io.isatty() and (colors.color8() or colors.color256()) then
local theme = colors.theme()
if theme and theme:name() ~= "plain" then
colors_diagnostics = self:has_flags("-fcolor-diagnostics", "cxflags") or false