These lines makes it fail if we have another cdylib crate without a .so file.
|
for artifact in artifacts.iter().filter(|a| artifact_is_cdylib(a)) { |
|
let Some(file) = artifact |
|
.filenames |
|
.iter() |
|
.find(|name| name.extension() == Some("so")) |
|
else { |
|
// This should never happen because we filter for cdylib outputs above but you |
|
// never know... and it still feels better than just unwrapping |
|
shell.error("No cdylib file found to copy")?; |
|
std::process::exit(1); |
|
}; |
It adds two problems:
- cargo ndk fails if the
host is windows & another cdylib crate exists compiled to .dll
- cargo ndk will incorrectly copy .so files if
host is linux & another cdylib crate exists with .so compiled to a non-android platform
I could fix this, but I don't know what would be the ideal way to do it without adding a breaking change.
These lines makes it fail if we have another cdylib crate without a .so file.
cargo-ndk/src/cli/mod.rs
Lines 743 to 753 in 87b29ee
It adds two problems:
host is windows&another cdylib crate exists compiled to .dllhost is linux&another cdylib crate exists with .so compiled to a non-android platformI could fix this, but I don't know what would be the ideal way to do it without adding a breaking change.