Skip to content

Commit 7feb598

Browse files
committed
apk: Use rustc --crate-type=cdylib to always force a lib to be compiled
This automatically turns `crate-type = ["lib"]` and `[lib]` targets into a `cdylib`, and otherwise errors when it encounters a binary.
1 parent 0f47f04 commit 7feb598

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cargo-apk/src/apk.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ impl<'a> ApkBuilder<'a> {
226226
self.min_sdk_version(),
227227
self.cmd.target_dir(),
228228
)?;
229-
cargo.arg("build");
229+
cargo.arg("rustc");
230+
cargo.arg("--crate-type=cdylib");
230231
if self.cmd.target().is_none() {
231232
cargo.arg("--target").arg(triple);
232233
}

0 commit comments

Comments
 (0)