[clang] [Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (PR #142409)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 2 15:58:53 PDT 2025


================
@@ -31,6 +31,16 @@ option:
 
   $ clang -cc1 -include-pch test.h.pch test.c -o test.s
 
+To ignore PCH options using ``clang -cc1``, use the option `-ignore-pch`:
----------------
mizvekov wrote:

Ah okay, my bad for confusing those two options.

Still, emit-pch isn't documented on the UserManual, as I expected.

Nonetheless, I think `-ignore-pch` doesn't make sense as a frontend flag, only as a driver flag.

> I am wondering why -emit-pch is CC1 only option but -include-pch is both ClangOption and CC1Option?

It's not one of the GCC flags, and other driver options provide its functionality.

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


More information about the cfe-commits mailing list