[clang] [clang][Driver] - Set FinalPhase to Precompile for PCH (PR #213164)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 31 09:57:27 PDT 2026


MaskRay wrote:

>  If there happens to be a linker flag present on a precompiled header compilation then clang will output an error: clang -x c++-header test.h -lm -o test.h.pch
> clang: error: cannot specify -o when generating multiple output files

There will be warning, which I think is expected. I don't see `cannot specify -o when generating multiple output files`
```
% clang -x c++-header -c a.h -lm -o a.pch
clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
```

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


More information about the cfe-commits mailing list