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

cargo xbuild doesn't take advantage of CARGO_TARGET_DIR #36

Open
alex opened this issue Jun 29, 2019 · 1 comment
Open

cargo xbuild doesn't take advantage of CARGO_TARGET_DIR #36

alex opened this issue Jun 29, 2019 · 1 comment

Comments

@alex
Copy link

alex commented Jun 29, 2019

I'm not sure exactly how this plays out, but I compile a number of crates using cargo xbuild, and I try to set CARGO_TARGET_DIR so that they all share a target/ directory and I only need to build the various dependencies once. However, core, compiler_builtins, and alloc seem to get rebuilt every time.

You can see this in the travis output for any build on https://travis-ci.org/alex/linux-kernel-module-rust

@phil-opp
Copy link
Member

You could try setting the XBUILD_SYSROOT_PATH environment variable.

I agree that it might make sense to consider the CARGO_TARGET_DIR environment variable too for placing the sysroot. However, there are some problems with using the same sysroot for mulitple independent projects due to some internal checksums, if I remember correctly.

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