[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 10:35:30 PST 2016


ruiu added inline comments.


================
Comment at: lib/Driver/Tools.cpp:234
                             const ArgList &Args, ArgStringList &CmdArgs,
                             const JobAction &JA) {
   const Driver &D = TC.getDriver();
----------------
hans wrote:
> Yes, this doesn't seem like exactly the right place, but maybe there is no better one. Perhaps we could add an "addCommonLinkerFlags" function?
The other way of propagating this is to use an environment variable. Because we have control of both the compiler and the linker, we can make a change to LLD to interpret something like LLD_COLOR_DIAGNOSTICS=1 and set it in Clang.

The point is that in that way we can still have the exact same command line for bfd/gold/lld. What do you think?


https://reviews.llvm.org/D27603





More information about the llvm-commits mailing list