fix envvar CARGO_CFG_TARGET_ARCH set at runtime vs compile time

This commit is contained in:
Morgan Funtowicz 2024-07-25 10:36:55 +00:00
parent dda015f2aa
commit fcbf2fc1ac
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ fn main() {
// NCCL is slightly trickier because it might not have a pkgconfig installed // NCCL is slightly trickier because it might not have a pkgconfig installed
let nccl_library_path = NCCL_ROOT_DIR.unwrap_or(&format!( let nccl_library_path = NCCL_ROOT_DIR.unwrap_or(&format!(
"/usr/local/{}-linux-gnu", "/usr/local/{}-linux-gnu",
env!("CARGO_CFG_TARGET_ARCH") env::var("CARGO_CFG_TARGET_ARCH").unwrap()
)); ));
println!(r"cargo:rustc-link-search=native={}", nccl_library_path); println!(r"cargo:rustc-link-search=native={}", nccl_library_path);
println!("cargo:rustc-link-lib=dylib=nccl"); println!("cargo:rustc-link-lib=dylib=nccl");