aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Driver/ToolChains.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index fec2209ca8..9b84966d81 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/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);