From 69a5804e51743d24b6e8b3c4c4ae70dcbbb33aa6 Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Thu, 25 Jul 2024 10:44:42 +0000 Subject: [PATCH] use std::env::const::ARCH --- backends/trtllm/build.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backends/trtllm/build.rs b/backends/trtllm/build.rs index c698c825..d25ff187 100644 --- a/backends/trtllm/build.rs +++ b/backends/trtllm/build.rs @@ -1,4 +1,5 @@ use std::env; +use std::env::consts::ARCH; use std::path::{absolute, PathBuf}; use cxx_build::CFG; @@ -126,10 +127,7 @@ 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", - env::var("CARGO_CFG_TARGET_ARCH").unwrap() - )); + let nccl_library_path = NCCL_ROOT_DIR.unwrap_or(&format!("/usr/local/{}-linux-gnu", ARCH)); println!(r"cargo:rustc-link-search=native={}", nccl_library_path); println!("cargo:rustc-link-lib=dylib=nccl");