[PATCH] D28046: Add -Wl, -color-diagnostics if a linker supports the option.
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 11:10:04 PST 2017
inglorion added inline comments.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:592
+if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wl,-color-diagnostics")
----------------
Why not check_cxx_compiler_flag("-Wl,-color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS), analogous with check_c_compiler_flag below for -fno-function-sections? Would that allow us to avoid the dance with saving CMAKE_REQUIRED_FLAGS and restoring it to its old value?
https://reviews.llvm.org/D28046
More information about the llvm-commits
mailing list