-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Cross-compiling LLVM fails because llvm-tblgen must be run. #39170
Comments
Related: #36867 |
Also related: #33353 Got here by trying to cross-compile GHC. |
Bah, yes this is a pain. cc @Ericson2314 @bgamari etc. I'll check back later but for now consider searching the PR/issue history-- this has been discussed and a few workarounds of varying quality have been proposed along the way. Maybe this will be the final motivation to polish one of those efforts and merge it! :) One example, IIRC, can be found in some of the earlier "versions" of my big musl PR. LMK if you have questions or can't find what I mean. Hopefully I'm remembering correctly :D. |
Sorry for the delay. I know I've approached this a few ways-- here's one that might have useful bits (this branch was never meant to be public, but just pushed in case useful... apologies for hackery and such O:)) https://github.com/dtzWill/nixpkgs/commits/experimental/cross-llvm Relevant to this issue in particular, it tries to avoid having to do full builds of LLVM on the buildPlatform just to get the tables generated for the LLVM you care about-- in particular, introduces special derivations that build just tablegen. I also added a dummy Anyway hope this helps, LMK if you have any questions. |
If we can do that branch simultaneous with #36867 (build == host == target) LLVM, I'll be very very happy :). |
I ended up getting around this by just passing in the host's LLVM and depending on it when @dtzWill is it really that bad to depend on the host's complete LLVM? It'll typically be in the binary cache, right? |
It seems better than not working at all, that's for sure! :) |
This works for me: TravisWhitaker@50a647e Although, I'm not sure this is the "right" way to build a cross-compile-friendly package, and maybe the "right" way to do it is changing in light of the work you guys are doing right now. |
This was fixed in #52031 |
Issue description
Cross-compiling LLVM for aarch64 like so(with nixpkgs HEAD):
Eventually fails with
Seems we need to use the host's
llvm-tblgen
when cross compiling.Steps to reproduce
nix-build -E "with import ./default.nix {crossSystem = (import ./lib).systems.examples.aarch64-multiplatform;}; llvmPackages.llvm"
The text was updated successfully, but these errors were encountered: