Skip to content

Commit

Permalink
Remove dynamic detection of pipelining support
Browse files Browse the repository at this point in the history
Pipelining has made its way to stable so no need to check that any
more.
  • Loading branch information
alexcrichton committed Sep 24, 2019
1 parent aa6b7e0 commit 0afe1b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
14 changes: 0 additions & 14 deletions src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub struct TargetInfo {
pub rustflags: Vec<String>,
/// Extra flags to pass to `rustdoc`, see `env_args`.
pub rustdocflags: Vec<String>,
pub supports_pipelining: Option<bool>,
}

/// Kind of each file generated by a Unit, part of `FileType`.
Expand Down Expand Up @@ -102,18 +101,6 @@ impl TargetInfo {
.args(&rustflags)
.env_remove("RUSTC_LOG");

// NOTE: set this unconditionally to `true` once support for `--json`
// rides to stable.
//
// Also note that we only learn about this functionality for the host
// compiler since the host/target rustc are always the same.
let mut pipelining_test = process.clone();
pipelining_test.args(&["--error-format=json", "--json=artifacts"]);
let supports_pipelining = match kind {
Kind::Host => Some(rustc.cached_output(&pipelining_test).is_ok()),
Kind::Target => None,
};

let target_triple = requested_target
.as_ref()
.map(|s| s.as_str())
Expand Down Expand Up @@ -203,7 +190,6 @@ impl TargetInfo {
"RUSTDOCFLAGS",
)?,
cfg,
supports_pipelining,
})
}

Expand Down
5 changes: 2 additions & 3 deletions src/cargo/core/compiler/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ impl<'a, 'cfg> Context<'a, 'cfg> {

let pipelining = bcx
.config
.get_bool("build.pipelining")?
.map(|t| t.val)
.unwrap_or(bcx.host_info.supports_pipelining.unwrap());
.get::<Option<bool>>("build.pipelining")?
.unwrap_or(true);

Ok(Self {
bcx,
Expand Down

0 comments on commit 0afe1b1

Please sign in to comment.