Skip to content

Commit

Permalink
implement requested changes for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
lucarlig committed Oct 19, 2024
1 parent 157d9b2 commit 607db5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
4 changes: 1 addition & 3 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3549,9 +3549,7 @@ impl Step for TestFloatParse {
let path = self.path.to_str().unwrap();
let crate_name = self.path.components().last().unwrap().as_os_str().to_str().unwrap();

if !builder.download_rustc() {
builder.ensure(tool::TestFloatParse { path: path.into(), host: self.host });
}
builder.ensure(tool::TestFloatParse { host: self.host });

// Run any unit tests in the crate
let cargo_test = tool::prepare_tool_cargo(
Expand Down
13 changes: 3 additions & 10 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,6 @@ tool_extended!((self, builder),

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct TestFloatParse {
pub path: PathBuf,
pub host: TargetSelection,
}

Expand All @@ -1111,26 +1110,20 @@ impl Step for TestFloatParse {
run.path("src/etc/test-float-parse")
}

fn make_run(run: RunConfig<'_>) {
for path in run.paths {
let path = path.assert_single_path().path.clone();
run.builder.ensure(Self { path, host: run.target });
}
fn make_run(_run: RunConfig<'_>) {
unimplemented!()
}

fn run(self, builder: &Builder<'_>) {
let bootstrap_host = builder.config.build;
let compiler = builder.compiler(builder.top_stage, bootstrap_host);
let path: &'static str =
Box::leak(self.path.to_str().unwrap().to_string().into_boxed_str());

if !builder.download_rustc() {
builder.ensure(ToolBuild {
compiler,
target: bootstrap_host,
tool: "test-float-parse",
mode: Mode::ToolStd,
path,
path: "src/etc/test-float-parse",
source_type: SourceType::InTree,
extra_features: Vec::new(),
allow_features: "",
Expand Down

0 comments on commit 607db5d

Please sign in to comment.