[clang] [Driver] -include: deprecate probing .gch (PR #67084)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 26 05:23:34 PDT 2023


zmodem wrote:

> Can we add a dedicated -Wdeprecated-gch diag group or something for this?

I gave it a flag in 39f36d5d5c88f49eaa946a3ee9ef887c04275a33

> (not sure what projects actually do this with Clang)

Turns out Chromium (and anyone else using gn) does: https://crbug.com/1486799
And probably other projects doing GCC-style pre-compiled header builds with Clang as a drop-in replacement for GCC.

In an environment like that, I'm not sure what action users should take when they see this warning: GCC doesn't understand `-include-pch`, and if `x.h.gch` is renamed to `x.h.pch`, GCC's `-include x.h` will not find it.

So it seems this feature really is necessary for drop-in compatibility with GCC.

https://github.com/llvm/llvm-project/pull/67084


More information about the cfe-commits mailing list