[clang] [MinGW] Add the compiler rt libdirs to the search path
authorMartin Storsjö <martin@martin.st>
Wed, 29 Apr 2020 07:34:08 +0000 (10:34 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 29 Apr 2020 17:35:50 +0000 (20:35 +0300)
commita0e53de472c5b9538884f23eb8f47c3bc734b345
tree6226b9cd52ed440935006a6c264ca52f93af2359
parent23e35f7c88549de8c76ee5b0643ce5116062563c
[clang] [MinGW] Add the compiler rt libdirs to the search path

This matches what is done for MSVC in
b8000c0ce84541c5b5535419234fb65ce77d6756. Since that commit, compiler
rt sanitizer libraries aren't linked to with absolute path on windows,
but using their basenames, requiring the libdirs to be passed to
the linker.

This fixes undefined behaviour sanitizer on MinGW after
b8000c0ce84541c5b5535419234fb65ce77d6756.

Differential Revision: https://reviews.llvm.org/D79076
clang/lib/Driver/ToolChains/MinGW.cpp