[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 11:27:40 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:

Here is how the flag is defined:
```
def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>,
  Visibility<[ClangOption, CC1Option]>,
  HelpText<"Include precompiled header file">, MetaVarName<"<file>">,
  MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>;
```

See Visibility, but it basically says it's both a driver and a frontend option.

Only the driver option is documented in the UserManual: You can see all examples shown don't include `-cc1`. in the command line args.

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


More information about the cfe-commits mailing list