<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/133580>133580</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM 20 packages ship bitcode instead of object files
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
infrastructure
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
AlexDenisov
</td>
</tr>
</table>
<pre>
It seems that the packages for (at least) LLVM 20.1.0 and 20.1.1 ship bitcode files instead of object files on both Linux and macOS.
Packages I checked:
- https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.1/LLVM-20.1.1-macOS-ARM64.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.0/LLVM-20.1.0-macOS-ARM64.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.1/LLVM-20.1.1-Linux-ARM64.tar.xz
This yields packages unusable at least on macOS with Xcode's clang, linking emits a lot of errors like this:
```
could not parse bitcode object file /opt/LLVM/20.1.0/lib/libLLVMSupport.a[32](CodeGenCoverage.cpp.o): 'Unknown attribute kind (91) (Producer: 'LLVM20.1.0' Reader: 'LLVM APPLE_1_1600.0.26.6_0')', using libLTO version 'LLVM version 16.0.0' in '/opt/LLVM/20.1.0/lib/libLLVMSupport.a[32](CodeGenCoverage.cpp.o)'
```
### Workaround
As a workaround, one can use compilers from the same package, but also have to use `lld` (`-fuse-ld=lld`), otherwise it fails with default Xcode linker (albeit for an unrelated reason):
```bash
> echo "int main() { return 0; }" > main.c
> /opt/LLVM/20.1.0/bin/clang main.c
dyld[10373]: Symbol not found: ___cxa_demangle
Referenced from: <565CE761-C1EB-37F5-9738-E1BCF6F2EC75> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
Expected in: <4C4C44F0-5555-3144-A1B9-74F6D413BAC4> /opt/LLVM/20.1.0/lib/libc++.1.0.dylib
clang: error: unable to execute command: Abort trap: 6
clang: error: linker command failed due to signal (use -v to see invocation)
```
This works though:
```bash
/opt/LLVM/20.1.0/bin/clang main.c -fuse-ld=lld
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8Vs9u2zgTfxr6MpAgkZZkH3yw5ehDgRQN2n67ewsocmxxTZMCSTnOPv2CkuI0RbPoHrqJQEsz5Pz9zQy59-poEDek2JFiv-BD6KzbbDVe92iUt5dFa-Xz5kMAj3j2EDoeIHQIPRcnfkQPB-uA0BUPoJH7QOga7u9_-wg0S_M0A27k9JqD71QPrQrCSoSD0uhBGR-QS7AHsO2fKMJMtwZaGzq4V2a4jjLOXHz6kpJsT7LttD68WPABRIfihJKwmQUJdCH0PhJoQ2hzVKEb2lTYM6GN1peXn6R3NqoltHEY7UdPaCPtk9GWy3mTdcdkcoHQJvo2fyWjTcn288dymQbu0utfv1R99kZ99l-r_977MTc_UD-tXzvl4Vmhlv4VK4MZPG81wgtaYqJHN-BJhQ7-iNAgtPIgNDdHQmvQypyUOQKeVfDAQdsQ0YLOWedBqxNC6JS_pX5ey2x-pogIO2gJxgboufN4Q-E3oANCG9uH2UlCm1vMtWqnNTK-DH1vXUg5KXaMkmJP6Kq2Ev-HprYXdPyIqej71BK6JmwLhFb_NydjnwzwEJxqh4BwUkbGolnnsVwIXT04KweBbj4RFb2or-AzcvmGBduHh_u7x_wxL7MszVJapuVj3Bp1xrWGwcegRZu_foILOq-suR1_-c7LNJtUqJH5CyJAqx8mZF4pmx743boTd3Yw8lv-Nib86ZVFa7AGQXADg0cQ9twrjc7Dwdnz2JU8P99aU9zeDgG49hY6fkEIdjxHykxrScosRp6UWXIYPCZaEraf6KPhNdjQoXtSHkEFOHCl_YRSiQc-6DChdQQoTi1Qtxh3WgfRQuNQ84ASHHJvzYSHH4K05b6bSewOUHQWCKXKBDhzZaKRESXVDhyGwRnICNsBqfaEUogn4q5UvEp4N49tlNaMtfXmkHzWkhS7PGMViwllW_jyfG6tHkvmMAafbeH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