Revert "[WoA][MSVC] Use default linker setting in MSVC-compatible driver"
authorPetr Hosek <phosek@google.com>
Fri, 19 Mar 2021 06:42:31 +0000 (23:42 -0700)
committerPetr Hosek <phosek@google.com>
Fri, 19 Mar 2021 06:42:31 +0000 (23:42 -0700)
This reverts commit ace56d41aca8cac7cead9c2c97278aa50fc945b1 which
broke builders that set CLANG_DEFAULT_LINKER.

clang/lib/Driver/ToolChains/MSVC.cpp

index 38ad712..96de023 100644 (file)
@@ -11,7 +11,6 @@
 #include "Darwin.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/Version.h"
-#include "clang/Config/config.h"
 #include "clang/Driver/Compilation.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/DriverDiagnostic.h"
@@ -578,10 +577,7 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   // translate 'lld' into 'lld-link', and in the case of the regular msvc
   // linker, we need to use a special search algorithm.
   llvm::SmallString<128> linkPath;
-  StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ,
-                                         CLANG_DEFAULT_LINKER);
-  if (Linker.empty())
-    Linker = "link";
+  StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "link");
   if (Linker.equals_lower("lld"))
     Linker = "lld-link";