Add the Solaris support directory to the header search when using libc++.

Unconditionally define __C99FEATURES__ when using C++ on Solaris.  This is a
(hopefully temporary) work around for libc++ exposing C99-but-not-C++98
features in C++98 mode.

llvm-svn: 151889
This commit is contained in:
David Chisnall 2012-03-02 10:49:52 +00:00
parent f485c3ccbd
commit e04307e47c
2 changed files with 6 additions and 1 deletions

View File

@ -498,7 +498,7 @@ protected:
Builder.defineMacro("_XOPEN_SOURCE", "600");
else
Builder.defineMacro("_XOPEN_SOURCE", "500");
if (Opts.CPlusPlus0x)
if (Opts.CPlusPlus)
Builder.defineMacro("__C99FEATURES__");
Builder.defineMacro("_LARGEFILE_SOURCE");
Builder.defineMacro("_LARGEFILE64_SOURCE");

View File

@ -461,6 +461,11 @@ void InitHeaderSearch::AddDefaultIncludePaths(const LangOptions &Lang,
AddPath(P.str(), CXXSystem, true, false, false, true);
}
}
// On Solaris, include the support directory for things like xlocale and
// fudged system headers.
if (triple.getOS() == llvm::Triple::Solaris)
AddPath("/usr/include/c++/v1/support/solaris", CXXSystem, true, false,
false);
AddPath("/usr/include/c++/v1", CXXSystem, true, false, false);
} else {