build: reserve `--color-diagnostics` for lld

When building out-of-tree compilers (e.g. swift), the linker check here
may yield incorrect values.  Ensure that we are using lld before we
attempt to use `--color-diagnostics` for the linker.  Other linkers (i.e
bfd, gold) do not support this flag and the test can pass in some cases
and then fail subsequently when building.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330158 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed