diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-07-01 15:36:31 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-07-01 15:36:31 +0000 |
| commit | 1f5ceb0b5d1f9c8a8a1b6c0f4ae88fd100662639 (patch) | |
| tree | c76cbd5da2f313cb5be2019e5f447b54c33e3845 /clang/lib/Driver | |
| parent | eda8f5d592d8462891c05a8639d1b18e91f8c559 (diff) | |
| download | bcm5719-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.cpp | 4 |
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)) |

