<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/144639>144639</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[RISCV] RISCVTargetParserDef.inc doesn't get rebuilt when RISCVProcessors.td is modified
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tclin914
</td>
</tr>
</table>
<pre>
There are a couple of post-commit CI failures (https://github.com/llvm/llvm-project/pull/144022) after we made changes to the CPU definitions.
The reason is that `RISCVTargetParserDef.inc` does not get rebuilt when `RISCVProcessors.td` is modified, because the build rule for `RISCVTargetParserDef.inc` does not declare a dependency on `RISCVProcessors.td`, as shown in `build.ninja`.
See https://github.com/llvm/llvm-project/blob/ad9e591fd53f2cf91a2744973b59669d873658af/llvm/cmake/modules/TableGen.cmake#L47 for more details.
The CMake version should be less than 3.23; otherwise, it will use depfiles (.inc.d) instead.
Should we explicitly add all the .td files under `llvm/lib/Target/RISCV/` as dependencies of `RISCVTargetParserDef.inc` , similar to `file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")`?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUlEtv2zgUhX8NtbmoIJF6mAstEjsqDDidII9uDYq8sthSpEFS8eTfDyi3TYGZYtqF4QXF-zjfORQh6JNF7Eh9S-pdJpY4Od9FabTlZZUNTr11zxN6BJF-IN1yNghuhLML8YN086wjbPcwCm0WjwEI3UwxngNhN4T2hPYnHadlyKWbCe2Nef3-9-Hs3ReUkdD-vBhDaF9WVUEpoRzEGNHDBWEWCkFOwp4wQHQQJ4TtwwsoHLXVUTsbclLckOLmeULwKIKzoAPESUQgTfG4f9p-fhb-hPFB-IB-h2OurSRNAcphAOsinDCCx2HRJsJlQvvj4oN3EkNwPuRRpSs6wOyUHjUqQrcwoBRLwHWqdF2BXwzC6Px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