summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/clang_cl.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index cf35af067..27afb1d26 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -83,6 +83,12 @@ function _has_color_diagnostics(self)
elseif self:has_flags("-fdiagnostics-color=always", "cxflags") then
colors_diagnostics = "-fdiagnostics-color=always"
end
+
+ -- enable color output for windows, @see https://github.com/xmake-io/xmake-vscode/discussions/260
+ if colors_diagnostics and
+ self:has_flags("-fansi-escape-codes", "cxflags") then
+ colors_diagnostics = table.join(colors_diagnostics, "-fansi-escape-codes")
+ end
end
end
colors_diagnostics = colors_diagnostics or false