Skip to content

Commit cbb85f1

Browse files
authored
Rollup merge of #131731 - lucarlig:master, r=onur-ozkan
add `TestFloatParse` to `tools.rs` for bootstrap add TestFloatParse to tools for bootstrap, I am not sure this is what the issue #128012 discussion wants. try-job: aarch64-apple
2 parents 457087e + bc9fc71 commit cbb85f1

2 files changed

Lines changed: 33 additions & 3 deletions

File tree

‎src/bootstrap/src/core/build_steps/test.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3549,9 +3549,7 @@ impl Step for TestFloatParse {
35493549
let path = self.path.to_str().unwrap();
35503550
let crate_name = self.path.components().last().unwrap().as_os_str().to_str().unwrap();
35513551

3552-
if !builder.download_rustc(){
3553-
builder.ensure(compile::Std::new(compiler,self.host));
3554-
}
3552+
builder.ensure(tool::TestFloatParse{host:self.host});
35553553

35563554
// Run any unit tests in the crate
35573555
let cargo_test = tool::prepare_tool_cargo(

‎src/bootstrap/src/core/build_steps/tool.rs‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,38 @@ tool_extended!((self, builder),
10971097
Rustfmt,"src/tools/rustfmt","rustfmt", stable=true, add_bins_to_sysroot = ["rustfmt","cargo-fmt"];
10981098
);
10991099

1100+
#[derive(Debug,Clone,PartialEq,Eq,Hash)]
1101+
pubstructTestFloatParse{
1102+
pubhost:TargetSelection,
1103+
}
1104+
1105+
implStepforTestFloatParse{
1106+
typeOutput = ();
1107+
constONLY_HOSTS:bool = true;
1108+
constDEFAULT:bool = false;
1109+
1110+
fnshould_run(run:ShouldRun<'_>) -> ShouldRun<'_>{
1111+
run.path("src/etc/test-float-parse")
1112+
}
1113+
1114+
fnrun(self,builder:&Builder<'_>){
1115+
let bootstrap_host = builder.config.build;
1116+
let compiler = builder.compiler(builder.top_stage, bootstrap_host);
1117+
1118+
builder.ensure(ToolBuild{
1119+
compiler,
1120+
target: bootstrap_host,
1121+
tool:"test-float-parse",
1122+
mode:Mode::ToolStd,
1123+
path:"src/etc/test-float-parse",
1124+
source_type:SourceType::InTree,
1125+
extra_features:Vec::new(),
1126+
allow_features:"",
1127+
cargo_args:Vec::new(),
1128+
});
1129+
}
1130+
}
1131+
11001132
implBuilder<'_>{
11011133
/// Gets a `BootstrapCommand` which is ready to run `tool` in `stage` built for
11021134
/// `host`.

0 commit comments

Comments
 (0)