summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-06-06 02:06:28 +0000
committerShoaib Meenai <smeenai@fb.com>2017-06-06 02:06:28 +0000
commit462f36d36d4593e30a1c765cd3c28a0c66633642 (patch)
tree40c7bcf24b7cc834e93e234324b2f250045a7917
parentb301806c4b79ac03303516ad512306fe590947f2 (diff)
downloadbcm5719-llvm-462f36d36d4593e30a1c765cd3c28a0c66633642.tar.gz
bcm5719-llvm-462f36d36d4593e30a1c765cd3c28a0c66633642.zip
[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 llvm-svn: 304761
-rw-r--r--clang/lib/Driver/ToolChains/MSVC.cpp4
-rw-r--r--clang/test/Driver/cl-link.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp
index 6f5f54165b3..9e9d943610b 100644
--- a/clang/lib/Driver/ToolChains/MSVC.cpp
+++ b/clang/lib/Driver/ToolChains/MSVC.cpp
@@ -529,9 +529,7 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
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>(
diff --git a/clang/test/Driver/cl-link.c b/clang/test/Driver/cl-link.c
index 4cc170c1cbb..142725fed8e 100644
--- a/clang/test/Driver/cl-link.c
+++ b/clang/test/Driver/cl-link.c
@@ -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
OpenPOWER on IntegriCloud