From 2d9b030e97915c484bece36000130aa910b96315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 2 Jan 2025 17:10:26 +0100 Subject: [PATCH] Enable sccache --- src/bootstrap/src/core/build_steps/gcc.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/gcc.rs b/src/bootstrap/src/core/build_steps/gcc.rs index 5139d84973c0..4d40874c51bd 100644 --- a/src/bootstrap/src/core/build_steps/gcc.rs +++ b/src/bootstrap/src/core/build_steps/gcc.rs @@ -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");