[LLD][COFF] Add LLVM toolchain library paths by default.
authorTobias Hieta <tobias.hieta@ubisoft.com>
Fri, 14 Jul 2023 07:46:54 +0000 (09:46 +0200)
committerTobias Hieta <tobias.hieta@ubisoft.com>
Fri, 14 Jul 2023 12:37:24 +0000 (14:37 +0200)
commitaf744f0b84e2b6410be65277068b9033124c73b2
tree84ef19bdde5f87443dbfdfa02dae99944dba29af
parentdc2b2ae7dc333f9c3769785fa147c7872adb9bba
[LLD][COFF] Add LLVM toolchain library paths by default.

We want lld-link to automatically find compiler-rt's and
libc++ when it's in the same directory as the rest of the
toolchain. This is because on Windows linking isn't done
via the clang driver - but instead invoked directly.

This prepends: <llvm>/lib <llvm>/lib/clang/XX/lib and
<llvm>/lib/clang/XX/lib/windows automatically to the library
search paths.

Related to #63827

Differential Revision: https://reviews.llvm.org/D151188
clang/lib/Driver/Driver.cpp
lld/COFF/Driver.cpp
lld/COFF/Driver.h
lld/docs/ReleaseNotes.rst
lld/test/COFF/print-search-paths.s