Skip to content

Commit 2d9b030

Browse files
committed
Enable sccache
1 parent 42413d9 commit 2d9b030

File tree

1 file changed

+8
-9
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+8
-9
lines changed

src/bootstrap/src/core/build_steps/gcc.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,22 @@ impl Step for Gcc {
144144
.arg("--disable-bootstrap")
145145
.arg("--disable-multilib")
146146
.arg(format!("--prefix={}", install_dir.display()));
147-
let cc = builder.build.cc(target).display().to_string();
148-
// if let Some(ref ccache) = builder.build.config.ccache {
149-
// cc = format!("{ccache} {cc}");
150-
// }
147+
let mut cc = builder.build.cc(target).display().to_string();
148+
if let Some(ref ccache) = builder.build.config.ccache {
149+
cc = format!("{ccache} {cc}");
150+
}
151151
configure_cmd.env("CC", cc);
152152

153153
if let Ok(ref cxx) = builder.build.cxx(target) {
154-
let cxx = cxx.display().to_string();
155-
// if let Some(ref ccache) = builder.build.config.ccache {
156-
// cxx = format!("{ccache} {cxx}");
157-
// }
154+
let mut cxx = cxx.display().to_string();
155+
if let Some(ref ccache) = builder.build.config.ccache {
156+
cxx = format!("{ccache} {cxx}");
157+
}
158158
configure_cmd.env("CXX", cxx);
159159
}
160160
configure_cmd.run(builder);
161161

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

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

0 commit comments

Comments
 (0)