Skip to content

Commit de9c697

Browse files
committed
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... ------------------------------------------------------------------------ llvm-svn: 143955
1 parent 02591c2 commit de9c697

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/lib/Driver/ToolChains.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,14 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
20172017
DriverArgs.hasArg(options::OPT_nostdincxx))
20182018
return;
20192019

2020+
// Check if libc++ has been enabled and provide its include paths if so.
2021+
if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) {
2022+
// libc++ is always installed at a fixed path on Linux currently.
2023+
addSystemInclude(DriverArgs, CC1Args,
2024+
getDriver().SysRoot + "/usr/include/c++/v1");
2025+
return;
2026+
}
2027+
20202028
const llvm::Triple &TargetTriple = getTriple();
20212029
const llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
20222030
bool IsTarget64Bit = (TargetArch == llvm::Triple::x86_64 ||

0 commit comments

Comments
 (0)