diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-11-07 09:01:17 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-11-07 09:01:17 +0000 |
commit | f470173e46c5eff5025d887a92f4854f9f34b800 (patch) | |
tree | a4a48a6034e2fb2a9425ca7530acb63976cdfc54 /clang/lib | |
parent | a6d409d543853faf44534a9018e318d6a86f17c3 (diff) | |
download | bcm5719-llvm-f470173e46c5eff5025d887a92f4854f9f34b800.tar.gz bcm5719-llvm-f470173e46c5eff5025d887a92f4854f9f34b800.zip |
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...
llvm-svn: 143916
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index fec2209ca8e..9b84966d81b 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -2010,6 +2010,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(); StringRef CxxIncludeRoot(CXX_INCLUDE_ROOT); |