summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-07-01 15:36:31 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-07-01 15:36:31 +0000
commit1f5ceb0b5d1f9c8a8a1b6c0f4ae88fd100662639 (patch)
treec76cbd5da2f313cb5be2019e5f447b54c33e3845 /clang/lib/Driver
parenteda8f5d592d8462891c05a8639d1b18e91f8c559 (diff)
downloadbcm5719-llvm-1f5ceb0b5d1f9c8a8a1b6c0f4ae88fd100662639.tar.gz
bcm5719-llvm-1f5ceb0b5d1f9c8a8a1b6c0f4ae88fd100662639.zip
Driver: support -L for MSVC toolchain under the GNU driver
When not using clang in the CL emulation mode, honour the -L flags as additional library paths to pass to the linker invocation. llvm-svn: 274356
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/Tools.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index cef2008bed4..8b1171aba5e 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -9950,6 +9950,10 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
WindowsSdkLibPath.c_str()));
}
+ if (!C.getDriver().IsCLMode() && Args.hasArg(options::OPT_L))
+ for (const auto &LibPath : Args.getAllArgValues(options::OPT_L))
+ CmdArgs.push_back(Args.MakeArgString("-libpath:" + LibPath));
+
CmdArgs.push_back("-nologo");
if (Args.hasArg(options::OPT_g_Group, options::OPT__SLASH_Z7))
OpenPOWER on IntegriCloud