Author: smeenai Date: Mon Jun 5 21:06:28 2017 New Revision: 304761 URL: http://llvm.org/viewvc/llvm-project?rev=304761&view=rev Log: [Driver] Don't force .exe suffix for lld
When cross-compiling to Windows using lld, we want the driver to invoke it as lld-link rather than lld-link.exe. On Windows, the LLVM fs functions take care of adding the .exe suffix where necessary, so we can just drop the addition in the toolchain entirely. Differential Revision: https://reviews.llvm.org/D33923 Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp cfe/trunk/test/Driver/cl-link.c Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MSVC.cpp?rev=304761&r1=304760&r2=304761&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/MSVC.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Mon Jun 5 21:06:28 2017 @@ -529,9 +529,7 @@ void visualstudio::Linker::ConstructJob( SkipSettingEnvironment:; #endif } else { - linkPath = Linker; - llvm::sys::path::replace_extension(linkPath, "exe"); - linkPath = TC.GetProgramPath(linkPath.c_str()); + linkPath = TC.GetProgramPath(Linker.str().c_str()); } auto LinkCmd = llvm::make_unique<Command>( Modified: cfe/trunk/test/Driver/cl-link.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-link.c?rev=304761&r1=304760&r2=304761&view=diff ============================================================================== --- cfe/trunk/test/Driver/cl-link.c (original) +++ cfe/trunk/test/Driver/cl-link.c Mon Jun 5 21:06:28 2017 @@ -56,4 +56,4 @@ // NONEXISTENT: nonexistent // RUN: %clang_cl /Tc%s -fuse-ld=lld -### 2>&1 | FileCheck --check-prefix=USE_LLD %s -// USE_LLD: lld-link.exe +// USE_LLD: lld-link _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits