diff options
| -rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 86ce0bbcfd0..ac7da45710b 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -728,7 +728,7 @@ if (UNIX AND endif() # lld doesn't print colored diagnostics when invoked from Ninja -if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja") +if (UNIX AND CMAKE_LINKER MATCHES lld AND CMAKE_GENERATOR STREQUAL "Ninja") include(CheckLinkerFlag) check_linker_flag("-Wl,--color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS) append_if(LINKER_SUPPORTS_COLOR_DIAGNOSTICS "-Wl,--color-diagnostics" |

