rustbuild: Support specifying archiver and linker explicitly

This commit is contained in:
Vadim Petrochenkov
2017-10-10 23:06:22 +03:00
parent 2689fd2402
commit 9e0fc5ccd0
29 changed files with 200 additions and 108 deletions

View File

@@ -47,6 +47,9 @@ fn main() {
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
cmd.arg("-Z").arg("force-unstable-if-unmarked");
}
if let Some(linker) = env::var_os("RUSTDOC_LINKER") {
cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options");
}
// Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
// it up so we can make rustdoc print this into the docs