clang-cl: Don't pass /defaultlib to the linker
Since r187945, clang-cl will add the runtime library dependency to
the .obj file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188086 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 69b6378..2953612 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -6552,7 +6552,8 @@
}
if (!Args.hasArg(options::OPT_nostdlib) &&
- !Args.hasArg(options::OPT_nostartfiles)) {
+ !Args.hasArg(options::OPT_nostartfiles) &&
+ !C.getDriver().IsCLMode()) {
CmdArgs.push_back("-defaultlib:libcmt");
}