Skip to content

Commit

Permalink
Fix variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev authored and bbqsrc committed Jan 13, 2025
1 parent 07bbd56 commit 1d1a6dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,18 @@ 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()))
.expect("Unable to get clang target")
.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)
);

Expand Down

0 comments on commit 1d1a6dc

Please sign in to comment.