<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98897>98897</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Runtimes] Builtins target forces runtime targets to reconfigure every build
</td>
</tr>
<tr>
<th>Labels</th>
<td>
cmake
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jhuber6
</td>
</tr>
</table>
<pre>
Using `LLVM_ENABLE_RUNTIMES` creatures nested CMake projects that the main interface will update. Currently, these nested projects will reconfigure every time `ninja` is run, even when nothing has changed in the project itself. This wastes a lot of time, especially when maintaining multiple targets at once.
After doing some digging, I've found that it's caused by the `builtins` dependency on the runtimes target. If `compiler-rt` isn't included or the `builtins` dependency isn't added, then the problem goes away. It seems that the `ExternalProject_Add` interface makes CMake think the `builtins` target is modified after we complete its build step, which triggers the reconfigure on the runtime.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEk09v4zgMxT-NfCFqKIrjJAcf0j8BCrSDxezMXgtZom21shSIdLL59gvZaXcWGGAv9oV8eu9HUhO5PiA2YnMvNo-FnniIqXkfphZTXbTRXpuf5EIPopYvL3-9vj19O9y_PL19__ntx_Pr05-ilmASap4SEgQkRgsPr_oD4ZTiOxom4EEz8IAwahfABcbUaYNwcd7DdLKasYSHKSUM7K9CPeRiwk-1L525PqGJoXP9lBDwjOkK7EbM9oIL7zr7cQRpClkHzxjgMmCAEHnIMQZNYAYderTgwuzqpg-OCX1Xwo_BEVw0MRJo8JEhdvMjsyKd0Djt_XXRzZFYu5C1x8mzO3kE1qlHJtAMMRgshXwU8rB8Dx1jAhtzA8URwbq-d6HP4s9Cbc8IXZyCXag5FmpLYPREaKG9zoZFLdvJeXaBclyLJwwWg7lCXBKlKWS_dDNSwnOXm0wcT85juku8YApCbRlcMH6yaCGm_5H_7NDWor3N6Yth63GEPmZoF30t4ZmBEMdfxi9q-fQ3Ywra_7EwfztYO1v52olRfyDdFihP7ON3lpZYec5jtK5zaEHPWC8IOaRHxjxOyE0WiPGU3V4GZwbg5PoeEy2kftmm_8IrC9us7X691wU2q61ayY2UdVUMzWq_0TuN7cpU1VrW1XpbV7udajupd3Jt2sI1SqpKbleb1Vptq6rcr3emQmmk2exas6pFJXHUzpfen8cypr5wRBM2-91uvy28btHTfJFKmQxEKJWPMzW5_q6dehKV9I6Y_lVgx34-4--34YvNI9zfoH0S62IySJ8Rv_aU42_OamZXTMk3A_OJxPog1FGoY-94mNrSxFGoY37-9ru73ZFQxzkNCXVcAp0b9U8AAAD__7LOgi4">