Generate multilib for rust_test

* Cannot generate multilib for host tests yet.

Bug: 158677299
Test: atest -c -m --include-subdirs external/rust/crates
Change-Id: I7071c1ea30865a8cf268dfe270f2a586eb7710d9
This commit is contained in:
Chih-Hung Hsieh
2020-06-16 01:25:27 -07:00
parent 0f688004b1
commit e728a89807

View File

@@ -57,7 +57,14 @@ func (test *testDecorator) nativeCoverage() bool {
}
func NewRustTest(hod android.HostOrDeviceSupported) (*Module, *testDecorator) {
module := newModule(hod, android.MultilibFirst)
// Build both 32 and 64 targets for device tests.
// Cannot build both for host tests yet if the test depends on
// something like proc-macro2 that cannot be built for both.
multilib := android.MultilibBoth
if hod != android.DeviceSupported && hod != android.HostAndDeviceSupported {
multilib = android.MultilibFirst
}
module := newModule(hod, multilib)
test := &testDecorator{
binaryDecorator: &binaryDecorator{