Make the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.
Post-commit suggestion by Filipe Cabecinhas. llvm-svn: 253161
This commit is contained in:
parent
aa40ddd3ba
commit
a7fa79fb9b
|
@ -9468,6 +9468,8 @@ void MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if (LinkerName.equals_lower("lld")) {
|
||||
CmdArgs.push_back("-flavor");
|
||||
CmdArgs.push_back("gnu");
|
||||
} else if (!LinkerName.equals_lower("ld")) {
|
||||
D.Diag(diag::err_drv_unsupported_linker) << LinkerName;
|
||||
}
|
||||
|
||||
if (!D.SysRoot.empty())
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
// CHECK_LLD_32: lld" "-flavor" "gnu"
|
||||
// CHECK_LLD_32: "i386pe"
|
||||
|
||||
// RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=link.exe 2>&1 | FileCheck -check-prefix=CHECK_LINK_32 %s
|
||||
// CHECK_LINK_32: link.exe"
|
||||
// CHECK_LINK_32: "i386pe"
|
||||
|
||||
// RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s
|
||||
// CHECK_LLD_64: lld" "-flavor" "gnu"
|
||||
// CHECK_LLD_64: "i386pep"
|
||||
|
|
Loading…
Reference in New Issue