mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
Disable PCH reading/writing
This commit is contained in:
parent
7a05f1ed06
commit
8cf8a3c4a4
@ -12,6 +12,7 @@
|
|||||||
#include <clang/Driver/Driver.h>
|
#include <clang/Driver/Driver.h>
|
||||||
#include <clang/Driver/Tool.h>
|
#include <clang/Driver/Tool.h>
|
||||||
#include <clang/Lex/Lexer.h>
|
#include <clang/Lex/Lexer.h>
|
||||||
|
#include <clang/Lex/PreprocessorOptions.h>
|
||||||
#include <llvm/Support/Host.h>
|
#include <llvm/Support/Host.h>
|
||||||
#include <llvm/Support/Path.h>
|
#include <llvm/Support/Path.h>
|
||||||
|
|
||||||
@ -148,6 +149,11 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
|
|||||||
auto &isec = ci->getFrontendOpts().Inputs;
|
auto &isec = ci->getFrontendOpts().Inputs;
|
||||||
if (isec.size())
|
if (isec.size())
|
||||||
isec[0] = FrontendInputFile(main, isec[0].getKind(), isec[0].isSystem());
|
isec[0] = FrontendInputFile(main, isec[0].getKind(), isec[0].isSystem());
|
||||||
|
// clangSerialization has an unstable format. Disable PCH reading/writing
|
||||||
|
// to work around PCH mismatch problems.
|
||||||
|
ci->getPreprocessorOpts().ImplicitPCHInclude.clear();
|
||||||
|
ci->getPreprocessorOpts().PrecompiledPreambleBytes = {0, false};
|
||||||
|
ci->getPreprocessorOpts().PCHThroughHeader.clear();
|
||||||
return ci;
|
return ci;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user