Skip to content

llvm-config is unusable with static libraries and cross compilation #148117

@sbourdeauducq

Description

@sbourdeauducq

Describe the bug

When cross-compiling LLVM, the produced llvm-config-native breaks when attempting to use it for the static libraries. The error messages are:

llvm-config: error: missing: /nix/store/bn4y633qrdc6972q6bdalvbawx8mv40p-llvm-aarch64-unknown-linux-gnu-12.0.1-dev/lib64/libLLVMDemangle.a
llvm-config: error: missing: /nix/store/bn4y633qrdc6972q6bdalvbawx8mv40p-llvm-aarch64-unknown-linux-gnu-12.0.1-dev/lib64/libLLVMSupport.a
...

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-build -A pkgsCross.aarch64-multiplatform.llvm_12.dev
  2. ./result-dev/bin/llvm-config-native --link-static --libs

Tested on current nixpkgs master (43ed124)

Expected behavior

Paths to the correct LLVM libraries are printed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: cross-compilationBuilding packages on a different platform than they will be used on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions