-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLVM-based cross compilation #36867
Comments
Too bad it still cannot build the kernel: https://lwn.net/Articles/734071/ |
@Mic92: Um, to quote the article:
(emphasis mine) Reducing the use of In addition, this mail from one month later claims that the Further improvement has likely occurred in the four months since then. |
Anyways, the point of this is to change how we package LLVM. Once we do that, we'll be able to attempt cross compiling any package we want, including Linux. Getting Linux to build with LLVM is an orthogonal concern. |
Does this mean your ultimate goal is to only build Nixpkgs with LLVM? Because that seems untenable :-/ |
@wmertens I'd argue that using clang, libc++, etc. would count as a distinct cross target - one potentially easier/simpler/cleaner to bootstrap. |
@wmertens No. I want to support as many combinations as we can without a a soup of conditionals. What we choose to support via CI resources I'll happily leave to others. Compare to NixOS/rfcs#23 not being about ditching glibc. |
@eternaleye Today, compiler and libc++ choices don't require a different platform name, but they could. libc ones do with |
@Ericson2314 Can this be closed? |
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
The text was updated successfully, but these errors were encountered: