Commit 00db3ddc authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Let lld emit colored diagnostics when invoked from ninja.

Bug: 841221
Change-Id: I72d13c78a2c623865a4f29542d25f6b3488b350b
Reviewed-on: https://chromium-review.googlesource.com/1067460Reviewed-by: default avatarReid Kleckner <rnk@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560343}
parent b97a12f3
...@@ -485,6 +485,19 @@ config("compiler") { ...@@ -485,6 +485,19 @@ config("compiler") {
cflags += [ "-fmerge-all-constants" ] cflags += [ "-fmerge-all-constants" ]
} }
if (use_lld) {
# TODO(thakis): Make the driver pass --color-diagnostics to the linker
# if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
# in ldflags instead.
if (is_win) {
# On Windows, we call the linker directly, instead of calling it through
# the driver.
ldflags += [ "--color-diagnostics" ]
} else {
ldflags += [ "-Wl,--color-diagnostics" ]
}
}
if (is_clang && !is_nacl && current_toolchain == host_toolchain && if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
target_os != "chromeos") { target_os != "chromeos") {
cflags += [ cflags += [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment