diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-11-07 10:44:38 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-11-07 10:44:38 +0000 |
commit | b35250b253ed6366132a76b1863fe214f146489c (patch) | |
tree | d1ac596787ea37ba3e58cf3fc192d779339f8f1a | |
parent | e7dad13dba072c3d055fe9b81233447689dae5af (diff) | |
download | clang-b35250b253ed6366132a76b1863fe214f146489c.tar.gz |
Merging r143916:
------------------------------------------------------------------------
r143916 | chandlerc | 2011-11-07 01:01:17 -0800 (Mon, 07 Nov 2011) | 4 lines
Fix Linux libc++ usage. Somehow this slipped through during the port.
Test cases for this and all the rest of the port are still in the works,
but will wait for a fixed computer and post 3.0 merging...
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143955 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 78223a9ba2..b140f9918e 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -2017,6 +2017,14 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, DriverArgs.hasArg(options::OPT_nostdincxx)) return; + // Check if libc++ has been enabled and provide its include paths if so. + if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) { + // libc++ is always installed at a fixed path on Linux currently. + addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/usr/include/c++/v1"); + return; + } + const llvm::Triple &TargetTriple = getTriple(); const llvm::Triple::ArchType TargetArch = TargetTriple.getArch(); bool IsTarget64Bit = (TargetArch == llvm::Triple::x86_64 || |