-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
LLVM-based cross compilation #36867
Copy link
Copy link
Closed
Labels
6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on
Milestone
Metadata
Metadata
Assignees
Labels
6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on
Fields
Give feedbackNo fields configured for issues without a type.
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