Skip to content
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

Provide a way to point to non git rust src directory #4

Open
arpad-m opened this issue Sep 15, 2016 · 4 comments
Open

Provide a way to point to non git rust src directory #4

arpad-m opened this issue Sep 15, 2016 · 4 comments

Comments

@arpad-m
Copy link

arpad-m commented Sep 15, 2016

It would be cool if there was a --rust-src param which you could point to the contents of an extracted tarball of the rust source code, which you can obtain via links of the form https://static.rust-lang.org/dist/2016-09-13/rust-src-nightly.tar.gz (in the best case I'd have to walk down the path to rust-src/lib/rustlib/src/rust/ myself, so the script wont take that over for me).

@arpad-m
Copy link
Author

arpad-m commented Sep 15, 2016

For context: I'm doing a setup where rust-cross-libs is its own buildroot package, and rust src and rust binaries are two host packages; both obtained from tarballs of that form.

@joerg-krause
Copy link
Owner

I'm doing a setup where rust-cross-libs is its own buildroot package, and rust src and rust binaries are two host packages; both obtained from tarballs of that form.

Sounds promising! I'm a Buildroot contributor, too, but I haven't thought of this, yet!

Why not use --rust-git?

@arpad-m
Copy link
Author

arpad-m commented Sep 15, 2016

Why not use --rust-git?

Buildroot has this property that the source code for all packages it downloads is downloaded ahead of the actual build steps, and put inside the dl folder. Using that folder you can theoretically build without internet connection, etc. Doing the git clone inside the build steps would violate that rule/property.

While buildroot has support for code from git repositories, the only thing you'll get is a directory with the source checked out, but no full git repository, and you will have to chose the commit beforehand.

@joerg-krause
Copy link
Owner

I see!

The script ensures, that Rust nightly and Rust git are pointing to the same commit-hash to prevent incompatibilities between the cross compiled standard crates and the rustc version used.

So, if using a non-git source directory this has to be ensured, too!

I guess the script cannot be easily used by Buildroot as it depends on many variables passed through the environment. However, I think it should be possible to port the shell part into a Buildroot Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants