<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/67085>67085</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Only apple defines `COMPILER_RT_SUPPORTED_ARCH` preventing others from building sanitizers as part of runtime
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chriselrod
</td>
</tr>
</table>
<pre>
I'm not 100% sure about this, but I spent all night combing over cmake files trying to figure out why the sanitizers weren't getting built on my Linux desktop when using
```
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind"
```
as one of the cmake options.
I believe the issue is that `COMPILER_RT_SUPPORTED_ARCH`, which is defined here as empty:
https://github.com/llvm/llvm-project/blob/1d0b7b6c8aed0b769f6cb41e09c4e62b618a7037/compiler-rt/cmake/config-ix.cmake#L223
only gets populated on the `if(APPLE)` branch here
https://github.com/llvm/llvm-project/blob/1d0b7b6c8aed0b769f6cb41e09c4e62b618a7037/compiler-rt/cmake/config-ix.cmake#L387
and thus the filters
https://github.com/llvm/llvm-project/blob/1d0b7b6c8aed0b769f6cb41e09c4e62b618a7037/compiler-rt/cmake/Modules/CompilerRTUtils.cmake#L76-L85
happening on the `else` of the `if(APPLE)`:
https://github.com/llvm/llvm-project/blob/1d0b7b6c8aed0b769f6cb41e09c4e62b618a7037/compiler-rt/cmake/config-ix.cmake#L645-L647
necessarily filter everything out as unsupported, hence no sanitizers getting built.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVE2P4jgQ_TXOpQQyDknIIYfuBrRI9DRiuveK7KSSeMexI39As79-5XR2plcaabWnHQkZu8Dleu9VPe6c7DRiRbJHkm0THnxvbFX3VjpU1jSJMM29OhBWDKCNhxWlhGXggkXgwgQPvpeOsCcQwcMB3IjaA1cKtOx6D7UZhNQdmCtaqAf-DaGVCh14e49xb6CVXcwWc936O_gewXEtvfwTrYMbWtSEFR469D5eEUEqD0bDcIej1OEdGnTfvBnh1qOG4KTuCN0S-kByOn-m42J7PP7-fNl9eXg87i7nty-vh-fdV5JuCWO1GUap0C6sJ-mjkqJ-f_--4UJ-7IO-Sd0Qxn6anzswGsG0E4YPsGb00mi3nC9M6wEEKolXnP4nnQtxBd9zDySnTy_Pp8Nxd76cXy9f306nl_Prbnt5OD_9Fl9iT3DrZd3HGw22UmMDPUY1HOAw-jtJ52d670cXT2xP2L6Tvg9iWZuBsL1S17-_FqM1f2DtCdsLZQRh-1VDRSHyesMx7vKyzWuxXiEt6zXmTOSrDS9oWhC2_8wa20-Ip6huZbeQ78s5kh4ZSz-KMlrdo5IORjMGxT02UcpIBMmpbAnbPJxOxx1hJckpCMt13U8Afz1Q6aaYhdcN-D64CUYrlUfr_udyn00TFDrC9k_z7-fXNy-V-1F-kS-Om2yuk48j6mlQv4uBymHUYO7nn8jzS7Zavs4Wx3w9S6OxRue4leo-KwN4RXv3_QQ2-Dg3QbswjsZ6bOJ89ahrBG0-29A_zGeZNFXalGnJE6xWeZmlWV4WNOkrbBCbsqCYlQzbzargApHTQhRlXqYtT2TFKEtpyRhdszKly5Qha9s1zxvaYFHUZE1x4FItI2NLY7tkMogqL-gmSxQXqNzk1oxpvH24RzSkbJvYamJZhM6RNVXSefcji5deYfUSx4-Po8LZPNy_Og6MFq-oJ_TG95GM1pphYqKJwU8scQcjtz62jA3aywGTYFX1n9tjQhWbd0L9VwAAAP__ScojSg">