Frontend: Add -cxx-system-include option which can be used to specify an
explicit list for the C++ system include directories at the -cc1 level, as an alternative to the horrible AddDefaultCPlusPlusIncludePaths(). llvm-svn: 113505
This commit is contained in:
@@ -443,6 +443,11 @@ static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts,
|
||||
Res.push_back(Opts.Sysroot);
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = Opts.CXXSystemIncludes.size(); i != e; ++i) {
|
||||
Res.push_back("-cxx-system-include");
|
||||
Res.push_back(Opts.CXXSystemIncludes[i]);
|
||||
}
|
||||
|
||||
/// User specified include entries.
|
||||
for (unsigned i = 0, e = Opts.UserEntries.size(); i != e; ++i) {
|
||||
const HeaderSearchOptions::Entry &E = Opts.UserEntries[i];
|
||||
@@ -1143,6 +1148,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
|
||||
|
||||
static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
|
||||
using namespace cc1options;
|
||||
Opts.CXXSystemIncludes = Args.getAllArgValues(OPT_cxx_system_include);
|
||||
Opts.Sysroot = Args.getLastArgValue(OPT_isysroot, "/");
|
||||
Opts.Verbose = Args.hasArg(OPT_v);
|
||||
Opts.UseBuiltinIncludes = !Args.hasArg(OPT_nobuiltininc);
|
||||
|
||||
Reference in New Issue
Block a user