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

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 10:40:47 PST 2016


hans added inline comments.


================
Comment at: lib/Driver/Tools.cpp:234
                             const ArgList &Args, ArgStringList &CmdArgs,
                             const JobAction &JA) {
   const Driver &D = TC.getDriver();
----------------
ruiu wrote:
> 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?
I don't think Clang passes things via the environment to any other tool. I think passing a flag is better.


https://reviews.llvm.org/D27603





More information about the llvm-commits mailing list