From 6da97ae922f71b7c870129e45e6c11418250b05e Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Fri, 20 Dec 2024 20:05:31 +0100 Subject: [PATCH] misc(backend): let's actually cache things now --- backends/trtllm/build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backends/trtllm/build.rs b/backends/trtllm/build.rs index 38118901..bc48c82e 100644 --- a/backends/trtllm/build.rs +++ b/backends/trtllm/build.rs @@ -117,6 +117,12 @@ fn build_backend(is_debug: bool, opt_level: &str, out_dir: &PathBuf) -> (PathBuf config.define("TGI_TRTLLM_BACKEND_BUILD_TESTS", "ON"); } + if let Some(wrapper) = option_env!("RUSTC_WRAPPER") { + if wrapper == "sccache" { + config.define("CMAKE_CXX_COMPILER_LAUNCHER", "sccache"); + } + } + if option_env!("USE_LLD_LINKER").is_some() { println!("cargo:warning=Using lld linker"); config.define("TGI_TRTLLM_BACKEND_BUILD_USE_LLD", "ON");