Skip to content

Commit

Permalink
Auto merge of #7440 - alexcrichton:always-pipeline, r=ehuss
Browse files Browse the repository at this point in the history
Remove dynamic detection of pipelining support

Pipelining has made its way to stable so no need to check that any
more.
  • Loading branch information
bors committed Sep 26, 2019
2 parents 74383b4 + 0afe1b1 commit 494cbd8
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 @@ -100,9 +100,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 494cbd8

Please sign in to comment.