Skip to content

Commit

Permalink
Enable sccache
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Jan 2, 2025
1 parent 42413d9 commit 2d9b030
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/bootstrap/src/core/build_steps/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,22 @@ impl Step for Gcc {
.arg("--disable-bootstrap")
.arg("--disable-multilib")
.arg(format!("--prefix={}", install_dir.display()));
let cc = builder.build.cc(target).display().to_string();
// if let Some(ref ccache) = builder.build.config.ccache {
// cc = format!("{ccache} {cc}");
// }
let mut cc = builder.build.cc(target).display().to_string();
if let Some(ref ccache) = builder.build.config.ccache {
cc = format!("{ccache} {cc}");
}
configure_cmd.env("CC", cc);

if let Ok(ref cxx) = builder.build.cxx(target) {
let cxx = cxx.display().to_string();
// if let Some(ref ccache) = builder.build.config.ccache {
// cxx = format!("{ccache} {cxx}");
// }
let mut cxx = cxx.display().to_string();
if let Some(ref ccache) = builder.build.config.ccache {
cxx = format!("{ccache} {cxx}");
}
configure_cmd.env("CXX", cxx);
}
configure_cmd.run(builder);

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

let lib_alias = install_dir.join("lib/libgccjit.so.0");
Expand Down

0 comments on commit 2d9b030

Please sign in to comment.