-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Fix cross-compilation #41
Conversation
Can you provide the shell.nix or flake.nix for you cross-compiling environment? |
8b4f70a
to
9c36018
Compare
It is part of a larger Nix framework (that is not yet open source) so it is a little bit tricky |
9c36018
to
fafdc7f
Compare
Seems to work fine with just changing where the dependencies are specified, sorry for making more changes than needed |
I can fix the commit message to better reflect the changes |
fafdc7f
to
8d530ee
Compare
Dependencies were specified in `depsTargetTarget` which would make them end up in the dependencies for the target platform when they are actually dependencies needed on the buildPlatform using the rust package. I.e. they are target dependencies of the compiler package but will be used as build platform dependencies when propagated.
8d530ee
to
70fc350
Compare
I also added a comment explaining WTH is going on :). Thanks for your time and sorry for being stubborn (and wrong)! |
Thanks! |
It seems like there has been a mixup on what the build, host and target platforms are. To
quote the Nixpkgs manual: "In summary, build is the platform on which a package is being
built, host is the platform on which it will run. The third attribute, target, is relevant
only for certain specific compilers and build tools."
This is what I think was intended and lets us successfully cross compile from linux and
macOS to WASI and Windows, something that was broken before where native dependencies would leak into the cross-compile.
Fixes #40