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

rustbuild: Add support for --enable-local-rust #33824

Merged
merged 1 commit into from
May 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/bootstrap/build/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ pub struct Config {
pub build: String,
pub host: Vec<String>,
pub target: Vec<String>,
pub rustc: Option<String>,
pub cargo: Option<String>,
pub rustc: Option<PathBuf>,
pub cargo: Option<PathBuf>,
pub local_rebuild: bool,

// libstd features
Expand Down Expand Up @@ -208,8 +208,8 @@ impl Config {
config.target.push(target.clone());
}
}
config.rustc = build.rustc;
config.cargo = build.cargo;
config.rustc = build.rustc.map(PathBuf::from);
config.cargo = build.cargo.map(PathBuf::from);
set(&mut config.compiler_docs, build.compiler_docs);
set(&mut config.docs, build.docs);

Expand Down Expand Up @@ -379,6 +379,10 @@ impl Config {
.or_insert(Target::default());
target.ndk = Some(PathBuf::from(value));
}
"CFG_LOCAL_RUST_ROOT" if value.len() > 0 => {
self.rustc = Some(PathBuf::from(value).join("bin/rustc"));
self.cargo = Some(PathBuf::from(value).join("bin/cargo"));
}
_ => {}
}
}
Expand Down