Skip to content

Commit

Permalink
Use --color-diagnostics instead of -color-diagnostics.
Browse files Browse the repository at this point in the history
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.

Differential Revision: https://reviews.llvm.org/D35327

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307850 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rui314 committed Jul 12, 2017
1 parent 9d9b7c8 commit f4634be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ endif()
# lld doesn't print colored diagnostics when invoked from 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"
check_linker_flag("-Wl,--color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS)
append_if(LINKER_SUPPORTS_COLOR_DIAGNOSTICS "-Wl,--color-diagnostics"
CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
endif()

Expand Down

0 comments on commit f4634be

Please sign in to comment.