Skip to content

Commit a3e322d

Browse files
committed
Do not install the versioned links and lib on Android
The platform uses plain .so
1 parent 9c5c603 commit a3e322d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/build.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,10 @@ impl InstallTargetPaths {
510510
}
511511
}
512512

513-
fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
513+
fn load_manifest_capi_config(
514+
pkg: &Package,
515+
rustc_target: &target::Target,
516+
) -> anyhow::Result<CApiConfig> {
514517
let name = &pkg
515518
.manifest()
516519
.targets()
@@ -690,6 +693,10 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
690693
}
691694
}
692695

696+
if rustc_target.os == "android" {
697+
versioning = false;
698+
}
699+
693700
let library = LibraryCApiConfig {
694701
name: lib_name,
695702
version,
@@ -920,7 +927,7 @@ fn compile_with_exec(
920927

921928
for unit in bcx.roots.iter() {
922929
let pkg = &unit.pkg;
923-
let capi_config = load_manifest_capi_config(pkg)?;
930+
let capi_config = load_manifest_capi_config(pkg, rustc_target)?;
924931
let name = &capi_config.library.name;
925932
let install_paths = InstallPaths::new(name, args, &capi_config);
926933
let pkg_rustflags = &capi_config.library.rustflags;
@@ -1007,7 +1014,7 @@ impl CPackage {
10071014
let id = pkg.package_id();
10081015
let version = pkg.version().clone();
10091016
let root_path = pkg.root().to_path_buf();
1010-
let capi_config = load_manifest_capi_config(pkg)?;
1017+
let capi_config = load_manifest_capi_config(pkg, rustc_target)?;
10111018

10121019
patch_target(pkg, libkinds, &capi_config)?;
10131020

0 commit comments

Comments
 (0)