Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Mar 5, 2025
1 parent 65f9589 commit 4393731
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/bootstrap/src/core/build_steps/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Step for Gcc {
return GccOutput { libgccjit: libgccjit_path };
}

build_gcc(&metadata, &builder, target);
build_gcc(&metadata, builder, target);

let lib_alias = metadata.install_dir.join("lib/libgccjit.so.0");
if !lib_alias.exists() {
Expand Down Expand Up @@ -169,7 +169,7 @@ fn libgccjit_built_path(install_dir: &Path) -> PathBuf {
fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
let Meta { stamp: _, out_dir, install_dir, root } = metadata;

t!(fs::create_dir_all(&out_dir));
t!(fs::create_dir_all(out_dir));

// GCC creates files (e.g. symlinks to the downloaded dependencies)
// in the source directory, which does not work with our CI setup, where we mount
Expand All @@ -182,7 +182,7 @@ fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
builder.remove_dir(&src_dir);
}
builder.create_dir(&src_dir);
builder.cp_link_r(&root, &src_dir);
builder.cp_link_r(root, &src_dir);
src_dir
} else {
root.clone()
Expand All @@ -191,7 +191,7 @@ fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
command(src_dir.join("contrib/download_prerequisites")).current_dir(&src_dir).run(builder);
let mut configure_cmd = command(src_dir.join("configure"));
configure_cmd
.current_dir(&out_dir)
.current_dir(out_dir)
// On CI, we compile GCC with Clang.
// The -Wno-everything flag is needed to make GCC compile with Clang 19.
// `-g -O2` are the default flags that are otherwise used by Make.
Expand Down Expand Up @@ -225,8 +225,8 @@ fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
}
configure_cmd.run(builder);

command("make").current_dir(&out_dir).arg(format!("-j{}", builder.jobs())).run(builder);
command("make").current_dir(&out_dir).arg("install").run(builder);
command("make").current_dir(out_dir).arg(format!("-j{}", builder.jobs())).run(builder);
command("make").current_dir(out_dir).arg("install").run(builder);
}

/// Configures a Cargo invocation so that it can build the GCC codegen backend.
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ download-rustc = false
";
self.download_file(&format!("{base}/{gcc_sha}/{filename}"), &tarball, help_on_error);
}
self.unpack(&tarball, &root_dir, "gcc");
self.unpack(&tarball, root_dir, "gcc");
}
}

Expand Down

0 comments on commit 4393731

Please sign in to comment.