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

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 04:18:59 PDT 2023


zmodem wrote:

The .gch probing has been part of Clang since 2009, and it matches GCC's behavior, so of course there are going to be users depending on it (Hyrum's law etc.). We don't have to look far for those users: Jan reported that Xcode relies on it, and I have reported that Chromium does as well. I think it's safe to assume that there are many more.

Because of that, I feel strongly that we should keep this behavior. It may be inelegant, but breaking our users is much worse.

Maybe one day Clang will define a new elegant driver interface without concerns about GCC or backwards compatibility, but that's not today.

If we want to solve the issues you linked to, checking the file magic seems like a more practical approach.

cc @llvm/clang-vendors in case there are more opinions.

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


More information about the cfe-commits mailing list