summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-08-30 22:10:27 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-08-30 22:10:27 +0000
commitd01704b149df0eecd294019485d46699010c4a2f (patch)
tree2597f2371c501a2dc34cef7f41da797caae4cb66 /clang/lib/Driver/ToolChain.cpp
parentdbaa61cbe36fb6178382cb1a3eb636ebb516bc1d (diff)
downloadbcm5719-llvm-d01704b149df0eecd294019485d46699010c4a2f.tar.gz
bcm5719-llvm-d01704b149df0eecd294019485d46699010c4a2f.zip
Driver: use the canonical static library naming
On Windows, static libraries are named lib<name>.lib while import libraries are named <name>.lib. Use the appropriate naming on itanium and msvc environments. This is setup properly so that if a dynamic builtins is used on Windows, it would do the right thing, although this is not currently wired through the driver (i.e. there is no equivalent to -{shared,static}-gcc). llvm-svn: 280169
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r--clang/lib/Driver/ToolChain.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 863bd0a164b..b1bdfa2784e 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -288,13 +288,13 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
bool Shared) const {
const llvm::Triple &TT = getTriple();
const char *Env = TT.isAndroid() ? "-android" : "";
- bool IsITANMSVCWindows =
+ bool IsWindowsIAMSVC =
TT.isWindowsMSVCEnvironment() || TT.isWindowsItaniumEnvironment();
StringRef Arch = getArchNameForCompilerRTLib(*this, Args);
- const char *Prefix = IsITANMSVCWindows ? "" : "lib";
+ const char *Prefix = (IsWindowsIAMSVC && Shared) ? "" : "lib";
const char *Suffix = Shared ? (Triple.isOSWindows() ? ".dll" : ".so")
- : (IsITANMSVCWindows ? ".lib" : ".a");
+ : (IsWindowsIAMSVC ? ".lib" : ".a");
SmallString<128> Path(getDriver().ResourceDir);
StringRef OSLibName = Triple.isOSFreeBSD() ? "freebsd" : getOS();
OpenPOWER on IntegriCloud