[Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains
authorSimon Moll <simon.moll@emea.nec.com>
Mon, 6 Dec 2021 10:00:38 +0000 (11:00 +0100)
committerSimon Moll <simon.moll@emea.nec.com>
Mon, 6 Dec 2021 12:31:51 +0000 (13:31 +0100)
commit34a43f2115af79f896c889433c57f3b400e9f2c6
treeefffdbce78759fdae0a851dbe206004d86b39c33
parent954582cdfc23a5dd90cb5bf6e5a0c45db300169e
[Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains

Before, the CLANG_DEFAULT_LINKER cmake option was a global override for
the linker that shall be used on all toolchains.  The linker binary
specified that way may not be available on toolchains with custom
linkers. Eg, the only linker for VE is named 'nld' - any other linker
invalidates the toolchain.

This patch removes the hard override and instead lets the generic
toolchain implementation default to CLANG_DEFAULT_LINKER.  Toolchains
can now deviate with a custom linker name or deliberatly default to
CLANG_DEFAULT_LINKER.

Reviewed By: MaskRay, phosek

Differential Revision: https://reviews.llvm.org/D115045
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChain.cpp
clang/test/Driver/ve-toolchain.c
clang/test/Driver/ve-toolchain.cpp