aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r--clang/lib/Driver/ToolChain.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 8933e90..f05c8a39 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -367,8 +367,10 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
TT.isWindowsMSVCEnvironment() || TT.isWindowsItaniumEnvironment();
const char *Prefix = IsITANMSVCWindows ? "" : "lib";
- const char *Suffix = Shared ? (Triple.isOSWindows() ? ".dll" : ".so")
+ const char *Suffix = Shared ? (Triple.isOSWindows() ? ".lib" : ".so")
: (IsITANMSVCWindows ? ".lib" : ".a");
+ if (Shared && Triple.isWindowsGNUEnvironment())
+ Suffix = ".dll.a";
for (const auto &LibPath : getLibraryPaths()) {
SmallString<128> P(LibPath);