[llvm] r330161 - Revert "build: reserve `--color-diagnostics` for lld"

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 16 14:57:10 PDT 2018


Author: compnerd
Date: Mon Apr 16 14:57:10 2018
New Revision: 330161

URL: http://llvm.org/viewvc/llvm-project?rev=330161&view=rev
Log:
Revert "build: reserve `--color-diagnostics` for lld"

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.

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=330161&r1=330160&r2=330161&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Mon Apr 16 14:57:10 2018
@@ -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"




More information about the llvm-commits mailing list