Issue |
133580
|
Summary |
LLVM 20 packages ship bitcode instead of object files
|
Labels |
bug,
infrastructure
|
Assignees |
|
Reporter |
AlexDenisov
|
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
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs