r253161 - Make the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.
Yaron Keren via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 15 00:06:27 PST 2015
Author: yrnkrn
Date: Sun Nov 15 02:06:27 2015
New Revision: 253161
URL: http://llvm.org/viewvc/llvm-project?rev=253161&view=rev
Log:
Make the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.
Post-commit suggestion by Filipe Cabecinhas.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/mingw-useld.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=253161&r1=253160&r2=253161&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sun Nov 15 02:06:27 2015
@@ -9468,6 +9468,8 @@ void MinGW::Linker::ConstructJob(Compila
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())
Modified: cfe/trunk/test/Driver/mingw-useld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mingw-useld.c?rev=253161&r1=253160&r2=253161&view=diff
==============================================================================
--- cfe/trunk/test/Driver/mingw-useld.c (original)
+++ cfe/trunk/test/Driver/mingw-useld.c Sun Nov 15 02:06:27 2015
@@ -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"
More information about the cfe-commits
mailing list