Add support for -I command-line argument to specify #include search directories.
This commit is contained in:
14
module.cpp
14
module.cpp
@@ -1175,6 +1175,20 @@ Module::execPreprocessor(const char* infilename, llvm::raw_string_ostream* ostre
|
||||
// track the source file position by handling them ourselves.
|
||||
inst.getPreprocessorOutputOpts().ShowComments = 1;
|
||||
|
||||
clang::HeaderSearchOptions &headerOpts = inst.getHeaderSearchOpts();
|
||||
headerOpts.UseBuiltinIncludes = 0;
|
||||
#ifndef LLVM_2_9
|
||||
headerOpts.UseStandardSystemIncludes = 0;
|
||||
#endif // !LLVM_2_9
|
||||
headerOpts.UseStandardCXXIncludes = 0;
|
||||
if (g->debugPrint)
|
||||
headerOpts.Verbose = 1;
|
||||
for (int i = 0; i < (int)g->includePath.size(); ++i)
|
||||
headerOpts.AddPath(g->includePath[i], clang::frontend::Angled,
|
||||
true /* is user supplied */,
|
||||
false /* not a framework */,
|
||||
true /* ignore sys root */);
|
||||
|
||||
clang::PreprocessorOptions &opts = inst.getPreprocessorOpts();
|
||||
|
||||
// Add defs for ISPC and PI
|
||||
|
||||
Reference in New Issue
Block a user