Provide 32-bit and 64-bit Rust libs by default.

CC libraries which depend on Rust libraries get missing dependency
errors when building 32-bit variants dependent on Rust modules which
don't explicitly have "multilib: both" declared.

Because CC libraries use MultilibBoth by default, Rust should do the
same.

This also fixes a bug where the ARM32 toolchain incorrectly embedded
toolchain64Bit instead of toolchain32Bit.

Bug: 154730212
Test: Rust libraries provide both variants by default.
Change-Id: Ia545fe069d3c6b77c3d18f4f10267e2c72ee0bab
This commit is contained in:
Ivan Lozano
2020-04-28 10:10:23 -04:00
parent 52c0b7b35b
commit 9d1df10e2a
6 changed files with 29 additions and 8 deletions

View File

@@ -46,24 +46,29 @@ func GatherRequiredDepsForTest() string {
crate_name: "std",
srcs: ["foo.rs"],
no_stdlibs: true,
host_supported: true,
}
rust_library_rlib {
name: "libstd.static",
crate_name: "std",
srcs: ["foo.rs"],
no_stdlibs: true,
host_supported: true,
}
rust_library_dylib {
name: "libtest",
crate_name: "test",
srcs: ["foo.rs"],
no_stdlibs: true,
host_supported: true,
}
rust_library_rlib {
name: "libtest.static",
crate_name: "test",
srcs: ["foo.rs"],
no_stdlibs: true,
host_supported: true,
}
` + cc.GatherRequiredDepsForTest(android.NoOsType)