Skip to content

Commit

Permalink
Add CC logic for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-A-Normal-Robot committed Nov 1, 2024
1 parent 2a87cab commit 5d35bc8
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions src/cold_clear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,62 @@ fn get_path_score(path: &str) -> i8 {
return 0;
}

#[cfg(target_arch = "aarch64")]
{
let pos_keywords = [
"arm64",
"aarch64"
];

for keyword in pos_keywords.iter() {
if path.contains(keyword) {
return 1;
}
}

let neg_keywords = [
"arm",
"armhf",
"armv7"
];

for keyword in neg_keywords.iter() {
if path.contains(keyword) {
return -1;
}
}

return 0;
}

#[cfg(target_arch = "arm")]
{
let pos_keywords = [
"armeabi-v7a",
"armv7",
"arm32"
];

for keyword in pos_keywords.iter() {
if path.contains(keyword) {
return 1;
}
}

let neg_keywords = [
"arm64",
"aarch64"
];

for keyword in neg_keywords.iter() {
if path.contains(keyword) {
return -1;
}
}

return 0;
}

#[allow(unreachable_code)]{
return 0;
}
Expand Down

0 comments on commit 5d35bc8

Please sign in to comment.