[llvm] [llvm-rc] Add /showIncludes dependency reporting (PR #217102)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 00:25:36 PDT 2026
mstorsjo wrote:
> > So no current build systems benefit from adding this right now, but this feature needs to be taken into use by them?
>
> Mostly. Build systems where the user can control the resource-compilation rule can use it immediately. With Ninja, this means passing `/showIncludes` to `llvm-rc.exe` and setting `deps = msvc`. [Ninja already knows how to parse this output](https://ninja-build.org/manual.html#_deps), so no further change is required.
>
> Build systems that abstract this rule away would need to add support. CMake, for example, uses a wrapper (`cmcldeps.exe`) that preprocesses the `.rc` file with `cl.exe` to discover included headers before invoking the resource compiler. That preprocessing step doesn't discover referenced resource files, which is a gap.
>
> CMake would need to be updated to recognize the `llvm-rc` case, pass `/showIncludes`, and configure the generated Ninja rule with `deps=msvc`.
... and also determine whether `llvm-rc` supports `/showIncludes` at all or not. But yeah, this sounds reasonable.
Does CMake use `cmcldeps` with `llvm-rc` right now, or only with `rc.exe`
> Separately, it looks like the GitHub Actions workflows for the latest revision are awaiting maintainer approval. Could someone approve them when convenient? Please let me know if I misunderstood how those work :)
Someone seems to have approved them now and they have passed, so I guess we can go ahead and merge this.
https://github.com/llvm/llvm-project/pull/217102
More information about the llvm-commits
mailing list