Skip to content

LLVM-based cross compilation #36867

@Ericson2314

Description

@Ericson2314

LLVM is a much nicer for cross compilation. It has been multi-target for the vast majority, and its associated runtime libraries (e.g. compiler-rt, libcxx) are readily built separately from the compiler itself.

Unfortunately, our current packaging doesn't take advantage of either of these. We build compiler-rt in the same derivation as LLVM, and we pull everything from the same boostrappping stage, precluding cross compilation infra from working its magic.

I took a stab at this in obsidiansystems@acf2ed5 (the top commit in https://github.com/obsidiansystems/nixpkgs/tree/split-compiler-rt). I should get around to at least rebasing that, but even in its current state that serves as a basic reference to what should be accomplished.


CC @angerman @dtzWill

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.topic: cross-compilationBuilding packages on a different platform than they will be used on

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions