From 6b74f5b41323a2242866d387ac32a81c1087488f Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Thu, 25 Jul 2024 10:47:52 +0000 Subject: [PATCH] make sure variable live long enough... --- backends/trtllm/build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backends/trtllm/build.rs b/backends/trtllm/build.rs index d25ff187..04b8c6b3 100644 --- a/backends/trtllm/build.rs +++ b/backends/trtllm/build.rs @@ -127,7 +127,8 @@ fn main() { }); // NCCL is slightly trickier because it might not have a pkgconfig installed - let nccl_library_path = NCCL_ROOT_DIR.unwrap_or(&format!("/usr/local/{}-linux-gnu", ARCH)); + let nccl_library_path_default = format!("/usr/local/{}-linux-gnu", ARCH); + let nccl_library_path = NCCL_ROOT_DIR.unwrap_or(&nccl_library_path_default); println!(r"cargo:rustc-link-search=native={}", nccl_library_path); println!("cargo:rustc-link-lib=dylib=nccl");