<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/97948>97948</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
compiler-rt & LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON: using "incorrect" triple leads to a cryptic error message
</td>
</tr>
<tr>
<th>Labels</th>
<td>
cmake,
compiler-rt,
build-problem
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sylvestre
</td>
</tr>
</table>
<pre>
Building llvm 18 on i386 with the option LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON & -DLLVM_HOST_TRIPLE=i386-linux-gnu failed with:
```
Call Stack (most recent call first):
/<<PKGBUILDDIR>>/compiler-rt/lib/CMakeLists.txt:4 (include)
CMake Error at /<<PKGBUILDDIR>>/compiler-rt/cmake/Modules/AddCompilerRT.cmake:281 (message):
Cannot find builtins library for the target architecture
Call Stack (most recent call first):
/<<PKGBUILDDIR>>/compiler-rt/lib/stats/CMakeLists.txt:23 (add_compiler_rt_runtime)
```
Full log:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-18&arch=i386&ver=1%3A18.1.8-2%7Eexp1&stamp=1720099326&raw=0
Changing from
-DLLVM_HOST_TRIPLE=i386-linux-gnu
to
-DLLVM_HOST_TRIPLE=i386-pc-linux-gnu
fixed the problem.
Dunno if it is an actual bug or we should just improve the error message
cc @MaskRay @petrhosek
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VMGO4jgQ_RpzKREFG5JwyIEmZLa19EyLYfaKjG0SD04c2WW6--9XDnSr0ay0s5eVokR2ql49v3pl7r1ueqVKsnggi2rCA7bWlf7NXJRHpyZHK9_Kh6CN1H0Dxlw6mBVge9CsyOBFYwvYKrADatvDdvvX02HzdfWw3RyeN7vDfrX7stkfdj--7h-fNofqcUdY9e0rAKEZTKsx_I9v3_eH_e7xebshrIqwU6P78Dpt-g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