Skip to content

LLVM 20 packages ship bitcode instead of object files #133580

Open
@AlexDenisov

Description

@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:

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):

> 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:

/opt/LLVM/20.1.0/bin/clang main.c -fuse-ld=lld

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Needs Fix

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions