-
Notifications
You must be signed in to change notification settings - Fork 2.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
rust: cross build (&template cleanup) #3233
Conversation
needs to add [ci skip] |
Currently tries to link against the host's LLVM: https://gist.github.com/0d9460d77cd0ce964b53f9526c6f47fe |
Here is a workaround for linking against host llvm:
The original |
Thanks, that worked. Now it tries to run the just cross compiled stage0 compiler though (which obviously doesn't work due to it being compiled for a different arch). Will look into it. |
I had the approach to unset the cross build environment variables through stage0 and let the build system figure out which vars to set. An alternative approach that would safe build time is to skip stage0 and stage1 and directly build the final compiler. The bootstrapping is already done in the native build. |
Sounds good, as we can't run any stage1 binaries during cross compilation anyway |
But I have no idea how to convince the build system to start with stage2. |
I suppose we can do so by directly using x.py |
Seems like we've mixed up |
c8a2e54
to
c2d89bd
Compare
Alright, cross building to aarch64 works now, testing the other arches. Does someone have aarch64 hardware to test the package? Otherwise I'll setup void on my RPI 3. |
Do note that bootstrapping rust on the host platform (not cross compiling) doesn't work right now, but the issue that causes it to fail is fixed in 1.28->1.29 anyway, so I don't really feel like wasting time on fixing that, I just need the 1.28 rust musl dist tarball to be uploaded my someone. |
Okay, in theory we could also build the rust standard library for every target, but that seems rather cumbersome and unnecessary. For our use cases it works just fine if we only compile the standard library for the target we're building for and just using |
Alright, rust builds for all platforms. Just adjusted the cargo build style and testing cross build for all of those packages. |
bootstrap musl rustc is currently compiling 👍 |
43b9e5c
to
9374f43
Compare
I will update rust to 1.29.1 after this, AFAIK firefox doesn't build with it and it makes sense to not merge all of this at once so that it's easier to see why stuff is breaking (in case it does). |
also cleanup the template [ci skip]
- enable cross compilation [ci skip]
Continuation of #3101. @Gottox currently seems to be very busy,
so I offered to get this working in #xbps earlier. Currently
building x86_64 -> aarch64, which doesn't work as of now, but early progresses somewhat further than before. However,
there's still stuff to be done: