Revert "build: reserve `--color-diagnostics` for lld"
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 16 Apr 2018 21:57:10 +0000 (21:57 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 16 Apr 2018 21:57:10 +0000 (21:57 +0000)
This reverts SVN r330158.

Seems that there was a change to linker flags handling in SVN r316972.
That would alter the behaviour to correct the linker flag handling in
CMake (requiring CMake 3.4.3+).  Since that is already the minimum
version required for LLVM, hard coding the knowledge of the linker is
not required, which is a strictly better solution.

llvm-svn: 330161

llvm/cmake/modules/HandleLLVMOptions.cmake

index ac7da45..86ce0bb 100644 (file)
@@ -728,7 +728,7 @@ if (UNIX AND
 endif()
 
 # lld doesn't print colored diagnostics when invoked from Ninja
-if (UNIX AND CMAKE_LINKER MATCHES lld AND CMAKE_GENERATOR STREQUAL "Ninja")
+if (UNIX 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"