https://bugs.llvm.org/show_bug.cgi?id=38817
Bug ID: 38817
Summary: -fansi-escape-codes should set Windows console mode
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangb...@nondot.org
Reporter: kpreis...@gmail.com
CC: llvm-bugs@lists.llvm.org
The Windows console in recent versions actually supports ANSI escape codes, see
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences.
For some reason, this does not yet work correctly with Clang. I tried setting
-fansi-escape-codes, but then I see the ANSI sequences themselves printed,
instead of the colors that the ANSI sequences should produce:
clang-cl.exe: ←[0;1;31merror: ←[0mno input files←[0m
Probably the console mode is not set correctly, so the
ENABLE_VIRTUAL_TERMINAL_PROCESSING flag should be set with SetConsoleMode.
You might also want to have a look into
https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/
and optionally use the new API if available, but that's another topic.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs