[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Thu May 15 06:55:48 PDT 2025


zmodem wrote:

Sorry, I don't remember seeing that discussion, and I'm probably missing lots of modules context. As a counter argument, clang-cl uses `/Yc` and `/Fp` to generate PCH files, to match MSVC's interface although the file format is different.

More importantly, it feels like we're being very unintentional about the interface design here. Why should clang-cl's `/Fo` name a BMI file if that's not what MSVC does, and the document clearly says that the flag "Specifies an object (.obj) file name or directory to be used instead of the default."?

If the idea is to punt on the design, maybe the solution is just to use regular clang flags for this?

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


More information about the cfe-commits mailing list