HomePhabricator

[cmake] Make linker detection take flags into account

Description

[cmake] Make linker detection take flags into account

LLVM might be compiled using a toolchain file which controls the linker
to use via flags (e.g. -B or -fuse-ld=). Take these flags into
account for linker detection. We can also correct the detection by
manually passing LLVM_USE_LINKER, of course, but it seems more
convenient to have the detection take flags into account.

Differential Revision: https://reviews.llvm.org/D45464

Details