remove the unstable rustdoc parameter --linker

use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.

closes: #63816
This commit is contained in:
Andreas Jonson
2019-09-01 08:49:26 +02:00
parent 59cc53e6e7
commit f0b30c7ded
7 changed files with 6 additions and 31 deletions

View File

@@ -5,6 +5,7 @@
use std::env;
use std::process::Command;
use std::path::PathBuf;
use std::ffi::OsString;
fn main() {
let args = env::args_os().skip(1).collect::<Vec<_>>();
@@ -44,7 +45,9 @@ fn main() {
cmd.arg("-Z").arg("force-unstable-if-unmarked");
}
if let Some(linker) = env::var_os("RUSTC_TARGET_LINKER") {
cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options");
let mut arg = OsString::from("-Clinker=");
arg.push(&linker);
cmd.arg(arg);
}
// Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick