aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-06-21 21:12:29 +0000
committerBob Wilson <bob.wilson@apple.com>2011-06-21 21:12:29 +0000
commit13c4f2144b35bda21746eb60ad90e52a9bd8dcda (patch)
tree322d8fca89a114ca0c217ddc2e779691208caa55 /lib/Driver/ToolChain.cpp
parentee273b3b312642da33dd832125206d30e07fc811 (diff)
Fix the default libc++ header search path to be sysrooted. Radar 9639692.
The -cxx-isystem path is not prefixed with the sysroot directory, so it's not a good way for the driver to set the system default C++ search path. Instead, add -stdlib as a cc1 option and teach the frontend how to find the headers. The driver can then just pass -stdlib through to "cc1". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 8079e1983f..cbbbc5c4de 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -205,19 +205,15 @@ void ToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &Args,
bool ObjCXXAutoRefCount) const {
CXXStdlibType Type = GetCXXStdlibType(Args);
+ // Header search paths are handled by the mass of goop in InitHeaderSearch.
+
switch (Type) {
case ToolChain::CST_Libcxx:
- CmdArgs.push_back("-nostdinc++");
- CmdArgs.push_back("-cxx-isystem");
- CmdArgs.push_back("/usr/include/c++/v1");
-
if (ObjCXXAutoRefCount)
CmdArgs.push_back("-fobjc-arc-cxxlib=libc++");
break;
case ToolChain::CST_Libstdcxx:
- // Currently handled by the mass of goop in InitHeaderSearch.
-
if (ObjCXXAutoRefCount)
CmdArgs.push_back("-fobjc-arc-cxxlib=libstdc++");
break;