Disable Rust vendor-specific modules

We need to avoid building Rust vendor-specific modules as there is no
vendor snapshot support for Rust yet.

Bug: 184042776
Test: m <vendor_rust_module> # build error generated
Change-Id: I5afce74bc939b3ceda5cbb9dbe75833d4c3b413e
Merged-In: I51a7fa49096ee5809fd37ce76113ff14841d1b52
This commit is contained in:
Ivan Lozano 2021-06-07 11:22:16 -04:00
parent b6d94b6999
commit ab5f042d9f
1 changed files with 6 additions and 0 deletions

View File

@ -217,6 +217,12 @@ func (mod *Module) ImageMutatorBegin(mctx android.BaseModuleContext) {
mctx.PropertyErrorf("vendor_ramdisk_available", "cannot be set for rust_ffi or rust_ffi_shared modules.")
}
}
vendorSpecific := mctx.SocSpecific() || mctx.DeviceSpecific()
if vendorSpecific {
mctx.PropertyErrorf("vendor or soc_specific",
"Rust modules do not yet support soc-specific modules")
}
cc.MutateImage(mctx, mod)