[lld] bcc34ab - [lld] Enable ANSI escape code for Windows
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 16:51:16 PDT 2021
Author: Fangrui Song
Date: 2021-09-09T16:51:11-07:00
New Revision: bcc34ab6c8ab7bdff6c520c824d6d71ddac7a896
URL: https://github.com/llvm/llvm-project/commit/bcc34ab6c8ab7bdff6c520c824d6d71ddac7a896
DIFF: https://github.com/llvm/llvm-project/commit/bcc34ab6c8ab7bdff6c520c824d6d71ddac7a896.diff
LOG: [lld] Enable ANSI escape code for Windows
Buffered diagnostics need ENABLE_VIRTUAL_TERMINAL_PROCESSING after D87272.
Do it unconditionally like FileCheck.
Added:
Modified:
lld/tools/lld/lld.cpp
Removed:
################################################################################
diff --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp
index 5d6142f5fd356..bfd4370d3f2df 100644
--- a/lld/tools/lld/lld.cpp
+++ b/lld/tools/lld/lld.cpp
@@ -39,6 +39,7 @@
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PluginLoader.h"
+#include "llvm/Support/Process.h"
#include <cstdlib>
using namespace lld;
@@ -199,6 +200,7 @@ static unsigned inTestVerbosity() {
int main(int argc, const char **argv) {
InitLLVM x(argc, argv);
+ sys::Process::UseANSIEscapeCodes(true);
// Not running in lit tests, just take the shortest codepath with global
// exception handling and no memory cleanup on exit.
More information about the llvm-commits
mailing list