Use a constant for unstable features needed by compiletest
This commit is contained in:
parent
2da29dbe8f
commit
4c23295dd9
3 changed files with 14 additions and 7 deletions
|
|
@ -3,7 +3,7 @@
|
|||
use crate::core::build_steps::compile::{
|
||||
add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo, std_crates_for_run_make,
|
||||
};
|
||||
use crate::core::build_steps::tool::{SourceType, prepare_tool_cargo};
|
||||
use crate::core::build_steps::tool::{COMPILETEST_ALLOW_FEATURES, SourceType, prepare_tool_cargo};
|
||||
use crate::core::builder::{
|
||||
self, Alias, Builder, Kind, RunConfig, ShouldRun, Step, crate_description,
|
||||
};
|
||||
|
|
@ -416,7 +416,7 @@ impl Step for Compiletest {
|
|||
&[],
|
||||
);
|
||||
|
||||
cargo.allow_features("test");
|
||||
cargo.allow_features(COMPILETEST_ALLOW_FEATURES);
|
||||
|
||||
// For ./x.py clippy, don't run with --all-targets because
|
||||
// linting tests and benchmarks can produce very noisy results
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use crate::core::build_steps::doc::DocumentationFormat;
|
|||
use crate::core::build_steps::gcc::{Gcc, add_cg_gcc_cargo_flags};
|
||||
use crate::core::build_steps::llvm::get_llvm_version;
|
||||
use crate::core::build_steps::synthetic_targets::MirOptPanicAbortSyntheticTarget;
|
||||
use crate::core::build_steps::tool::{self, SourceType, Tool};
|
||||
use crate::core::build_steps::tool::{self, COMPILETEST_ALLOW_FEATURES, SourceType, Tool};
|
||||
use crate::core::build_steps::toolstate::ToolState;
|
||||
use crate::core::build_steps::{compile, dist, llvm};
|
||||
use crate::core::builder::{
|
||||
|
|
@ -721,7 +721,7 @@ impl Step for CompiletestTest {
|
|||
SourceType::InTree,
|
||||
&[],
|
||||
);
|
||||
cargo.allow_features("test");
|
||||
cargo.allow_features(COMPILETEST_ALLOW_FEATURES);
|
||||
run_cargo_test(cargo, &[], &[], "compiletest self test", host, builder);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -444,7 +444,11 @@ macro_rules! bootstrap_tool {
|
|||
SourceType::InTree
|
||||
},
|
||||
extra_features: vec![],
|
||||
allow_features: concat!($($allow_features)*),
|
||||
allow_features: {
|
||||
let mut _value = "";
|
||||
$( _value = $allow_features; )?
|
||||
_value
|
||||
},
|
||||
cargo_args: vec![],
|
||||
artifact_kind: if false $(|| $artifact_kind == ToolArtifactKind::Library)* {
|
||||
ToolArtifactKind::Library
|
||||
|
|
@ -458,6 +462,8 @@ macro_rules! bootstrap_tool {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) const COMPILETEST_ALLOW_FEATURES: &str = "test";
|
||||
|
||||
bootstrap_tool!(
|
||||
// This is marked as an external tool because it includes dependencies
|
||||
// from submodules. Trying to keep the lints in sync between all the repos
|
||||
|
|
@ -468,7 +474,7 @@ bootstrap_tool!(
|
|||
Tidy, "src/tools/tidy", "tidy";
|
||||
Linkchecker, "src/tools/linkchecker", "linkchecker";
|
||||
CargoTest, "src/tools/cargotest", "cargotest";
|
||||
Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true, allow_features = "test";
|
||||
Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true, allow_features = COMPILETEST_ALLOW_FEATURES;
|
||||
BuildManifest, "src/tools/build-manifest", "build-manifest";
|
||||
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
|
||||
RustInstaller, "src/tools/rust-installer", "rust-installer";
|
||||
|
|
@ -483,7 +489,8 @@ bootstrap_tool!(
|
|||
GenerateCopyright, "src/tools/generate-copyright", "generate-copyright";
|
||||
SuggestTests, "src/tools/suggest-tests", "suggest-tests";
|
||||
GenerateWindowsSys, "src/tools/generate-windows-sys", "generate-windows-sys";
|
||||
RustdocGUITest, "src/tools/rustdoc-gui-test", "rustdoc-gui-test", is_unstable_tool = true, allow_features = "test";
|
||||
// rustdoc-gui-test has a crate dependency on compiletest, so it needs the same unstable features.
|
||||
RustdocGUITest, "src/tools/rustdoc-gui-test", "rustdoc-gui-test", is_unstable_tool = true, allow_features = COMPILETEST_ALLOW_FEATURES;
|
||||
CoverageDump, "src/tools/coverage-dump", "coverage-dump";
|
||||
WasmComponentLd, "src/tools/wasm-component-ld", "wasm-component-ld", is_unstable_tool = true, allow_features = "min_specialization";
|
||||
UnicodeTableGenerator, "src/tools/unicode-table-generator", "unicode-table-generator";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue