<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/148702>148702</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM 20.1 bazel has unresolved cyclic dependency in `CodeGen`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
corpoverlords
</td>
</tr>
</table>
<pre>
Hello,
The Bazel build for LLVM 20.1 seems to have incorrect dep tree compared to the CMake build for `CodeGen`.
Sometimes I see the error:
```
bazel-out/k8-fastbuild/bin/external/llvm-project/llvm/libCodeGen.a(ARMException.pic.o)(.data+0x158): error: undefined reference to 'typeinfo for llvm::ARMTargetStreamer'
```
With single-pass linkers like gold.
This is due to `ARMTargetStreamer` not in the `CodeGen` target but in `ARMCodeGen` target. However, `ARMCodeGen` depends on `CodeGen` and there is a cyclic dependency which must be broken.
I don't know what is the best fix...
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsU8lu8zYQfhrqMrBAUYvtgw6KWzcB4ksStGcuI4s1RQok5aVPX1Bxm-0HDBDWDL9l-A0PQR8tYkvqB1L_lvE5Ds630vnJndEb51XIhFO39hGNcYTtCO0I7d4GhAf-DxoQszYKeufh-fnPAzCaFxAQxwDRwcDPCNpK5z3KCAoniB4RpBsn7lGlnjgg7A78hJ-gSEN3TuEfaElD83fKVzdi1CMGeEoEyz303nlSpjJp6P1HO5GUrdwcCdufNqueh7hgE7YX2hK2x2tEb7khbG_MeVxN3v2NMt7_pkOLu4CcE7bpXg6_XyVOUTubT1rmjrAtYZtc8cgJe6DXot6kT2X3vyaYrcJeW1TgsUePVmLyS9g63ibUtneL14Wx7EjZdS-HN-6PGF-jRz6iJ2z9zRmh3V86DhC0PRpcTTwEMNqe0KfzhHB0RuX_vZEOoAOo-Z23oT8JGgrWRdB2GeeXsUNcWkHMS_39-o9yDo_uguekdfezR-GEVgVw9hs2tyoxekwCOcibNFre29HKG1wGLQcY5xBBIAjvTmjvvp5AOZumCCfrLnAZeEwoyYDAEKHX1zzPM9WWaltueYZtsa5ZXWy3RZEN7aahWLB1JaoeRVFhLSQ2hVJcUl72Fc90yyir6bqoii2t6ToXvCyqOoE1tGg2JakojlybPD1d7vwx0yHM2BbVZk1ZZrhAE5aNYsziBZYqYSwtmG-XwIn5GEhFjQ4xfMBEHQ22H3u05BgGHmC2HoMzZ1S_mJX-Nt1s9qYdYpxCyhXbE7Y_6jjMIpdu_JTxr8lfVAbC9ncb55b9GwAA___4VlOb">