rust: Add vendor and recovery dylib support.
Adds dylib support for vendor and recovery images. This changes the default linkage for vendor and recovery images to dylib, which matches the platform default linkage. This also means that by default, dylib-std variants are used for rlib dependencies. Bug: 204303985 Test: Soong tests. Test: m dist vendor-snapshot Test: RECOVERY_SNAPSHOT_VERSION=current m dist recovery-snapshot Change-Id: If84074b8615a70c45e7e162abeb853dc8c34d49a
This commit is contained in:
@@ -220,9 +220,6 @@ func (mod *Module) SetImageVariation(ctx android.BaseModuleContext, variant stri
|
||||
}
|
||||
|
||||
func (mod *Module) ImageMutatorBegin(mctx android.BaseModuleContext) {
|
||||
// Rust does not support installing to the product image yet.
|
||||
vendorSpecific := mctx.SocSpecific() || mctx.DeviceSpecific()
|
||||
|
||||
if Bool(mod.VendorProperties.Double_loadable) {
|
||||
mctx.PropertyErrorf("double_loadable",
|
||||
"Rust modules do not yet support double loading")
|
||||
@@ -232,11 +229,6 @@ func (mod *Module) ImageMutatorBegin(mctx android.BaseModuleContext) {
|
||||
mctx.PropertyErrorf("vendor_ramdisk_available", "cannot be set for rust_ffi or rust_ffi_shared modules.")
|
||||
}
|
||||
}
|
||||
if vendorSpecific {
|
||||
if lib, ok := mod.compiler.(libraryInterface); ok && lib.buildDylib() {
|
||||
mctx.PropertyErrorf("vendor", "Vendor-only dylibs are not yet supported, use rust_library_rlib.")
|
||||
}
|
||||
}
|
||||
if mctx.ProductSpecific() {
|
||||
if lib, ok := mod.compiler.(libraryInterface); ok && lib.buildDylib() {
|
||||
mctx.PropertyErrorf("product", "Product-only dylibs are not yet supported, use rust_library_rlib.")
|
||||
|
Reference in New Issue
Block a user