Skip to content

Commit ee2d4f5

Browse files
committed
Disable -include b.hh => -include b.hh.{gch,pch} transition
See https://maskray.me/blog/2023-07-16-precompiled-headers for the behavior.
1 parent ba38e13 commit ee2d4f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/clang_tu.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
121121
driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, "ccls", vfs);
122122
#endif
123123
d.setCheckInputsExist(false);
124+
#if LLVM_VERSION_MAJOR >= 15
125+
// For -include b.hh, don't probe b.hh.{gch,pch} and change to -include-pch.
126+
d.setProbePrecompiled(false);
127+
#endif
124128
std::unique_ptr<driver::Compilation> comp(d.BuildCompilation(args));
125129
if (!comp)
126130
return nullptr;

0 commit comments

Comments
 (0)