Cross-compiling with LLVM as a dependency

I’m trying to cross compile a relative simply project from Linux to systems.examples.musl64. However, the project has one dependency: LLVM. Everything mostly works, and I get a cross-compiled version of LLVM, but I’m getting build errors in my project. That project uses llvm-config to get information about the required libraries. On a native builds, this works fine, but not when cross-compiling. I’m assuming that llvm-config is being build for the host system, and I need a copy for the build system.

I’ve viewed the derivation for LLVM in nixpkgs, but haven’t found a handle.

Does anyone have any pointers? Does the derivation need to be changed to handle cross-compilation?

1 Like