]> granicus.if.org Git - clang/commitdiff
clang-cl: Don't pass /defaultlib to the linker
authorHans Wennborg <hans@hanshq.net>
Fri, 9 Aug 2013 17:38:42 +0000 (17:38 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 9 Aug 2013 17:38:42 +0000 (17:38 +0000)
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

lib/Driver/Tools.cpp

index 69b6378b45eedb0d69a58d05b31ea1e431dd7370..2953612f64c0976c94e2cd2a948b2b23dc783a9d 100644 (file)
@@ -6552,7 +6552,8 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
   }
 
   if (!Args.hasArg(options::OPT_nostdlib) &&
-    !Args.hasArg(options::OPT_nostartfiles)) {
+      !Args.hasArg(options::OPT_nostartfiles) &&
+      !C.getDriver().IsCLMode()) {
     CmdArgs.push_back("-defaultlib:libcmt");
   }