diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-06-21 21:12:29 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-06-21 21:12:29 +0000 |
commit | b02ea3d70d83cf549059957775272334c5a4f60c (patch) | |
tree | af23f00c3da912135ac0eac473c3385ee8faa24d /clang/lib/Driver/ToolChain.cpp | |
parent | 5464de6d90a4088153ceae53d86233fa12ff225d (diff) | |
download | bcm5719-llvm-b02ea3d70d83cf549059957775272334c5a4f60c.tar.gz bcm5719-llvm-b02ea3d70d83cf549059957775272334c5a4f60c.zip |
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".
llvm-svn: 133547
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChain.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 8079e1983f3..cbbbc5c4de2 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/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; |