From 0afe1b116ef8799470209eee341efea606d85b69 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 24 Sep 2019 11:57:18 -0700 Subject: [PATCH] Remove dynamic detection of pipelining support Pipelining has made its way to stable so no need to check that any more. --- .../core/compiler/build_context/target_info.rs | 14 -------------- src/cargo/core/compiler/context/mod.rs | 5 ++--- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 25095b3324e..2a4f5545be5 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -34,7 +34,6 @@ pub struct TargetInfo { pub rustflags: Vec, /// Extra flags to pass to `rustdoc`, see `env_args`. pub rustdocflags: Vec, - pub supports_pipelining: Option, } /// Kind of each file generated by a Unit, part of `FileType`. @@ -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()) @@ -203,7 +190,6 @@ impl TargetInfo { "RUSTDOCFLAGS", )?, cfg, - supports_pipelining, }) } diff --git a/src/cargo/core/compiler/context/mod.rs b/src/cargo/core/compiler/context/mod.rs index db5ea9eca17..60b1d60481d 100644 --- a/src/cargo/core/compiler/context/mod.rs +++ b/src/cargo/core/compiler/context/mod.rs @@ -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::>("build.pipelining")? + .unwrap_or(true); Ok(Self { bcx,