From 1d1a6dc70a99b7f95bc71ed07bf893ef37966efc Mon Sep 17 00:00:00 2001 From: FernTheDev <15272073+Fernthedev@users.noreply.github.com> Date: Sun, 12 Jan 2025 23:50:46 -0400 Subject: [PATCH] Fix variable shadowing --- src/cargo.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cargo.rs b/src/cargo.rs index c002569..69cc10d 100644 --- a/src/cargo.rs +++ b/src/cargo.rs @@ -151,11 +151,10 @@ pub(crate) fn build_env( .join(ARCH) .join("lib") .join("clang"); - // let clang_rt = format!("-L{}/toolchains/llvm/prebuilt/{ARCH}/lib/clang/{clang_version}/lib/linux -lstatic=clang_rt.builtins-{}-android", ndk_home.display(), rt_builtins(triple)); // choose the clang target with the highest version // Should we filter for only numbers? - let clang_target = fs::read_dir(clang_folder) + let clang_builtins_target = fs::read_dir(clang_folder) .expect("Unable to get clang target directory") .filter_map(|a| a.ok()) .max_by(|a, b| a.file_name().cmp(&b.file_name())) @@ -163,7 +162,7 @@ pub(crate) fn build_env( .path(); let clang_rt = format!( "-L{} -lstatic=clang_rt.builtins-{}-android", - clang_target.join("lib").join("linux").display(), + clang_builtins_target.join("lib").join("linux").display(), rt_builtins(triple) );