From e2207956391f3c55ec86f31fb4b683a77d38546e Mon Sep 17 00:00:00 2001 From: "Carson M." Date: Thu, 7 Nov 2024 12:18:31 -0600 Subject: [PATCH] fix(sys): allow overriding dynamic linking with cuda/tensorrt --- ort-sys/build.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ort-sys/build.rs b/ort-sys/build.rs index 62f356e..5a922ef 100644 --- a/ort-sys/build.rs +++ b/ort-sys/build.rs @@ -165,14 +165,9 @@ fn static_link_prerequisites(using_pyke_libs: bool) { } fn prefer_dynamic_linking() -> bool { - // If the cuda or tensorrt features are enabled, we need to use dynamic linking. - if cfg!(feature = "cuda") || cfg!(feature = "tensorrt") { - return true; - } - match env::var(ORT_ENV_PREFER_DYNAMIC_LINK) { Ok(val) => val == "1" || val.to_lowercase() == "true", - Err(_) => false + Err(_) => cfg!(feature = "cuda") || cfg!(feature = "tensorrt") } }