Support for rust recovery snapshot.
Bug: 197866992 Test: source build/envsetup.sh Test: m -j nothing Change-Id: I02bb188669cf9f17073592a4622998f96d5f54ac
This commit is contained in:
@@ -44,6 +44,8 @@ func init() {
|
||||
func registerRustSnapshotModules(ctx android.RegistrationContext) {
|
||||
cc.VendorSnapshotImageSingleton.RegisterAdditionalModule(ctx,
|
||||
"vendor_snapshot_rlib", VendorSnapshotRlibFactory)
|
||||
cc.RecoverySnapshotImageSingleton.RegisterAdditionalModule(ctx,
|
||||
"recovery_snapshot_rlib", RecoverySnapshotRlibFactory)
|
||||
}
|
||||
|
||||
func snapshotLibraryFactory(image cc.SnapshotImage, moduleSuffix string) (*Module, *snapshotLibraryDecorator) {
|
||||
@@ -104,6 +106,13 @@ func VendorSnapshotRlibFactory() android.Module {
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
func RecoverySnapshotRlibFactory() android.Module {
|
||||
module, prebuilt := snapshotLibraryFactory(cc.RecoverySnapshotImageSingleton, cc.SnapshotRlibSuffix)
|
||||
prebuilt.libraryDecorator.BuildOnlyRlib()
|
||||
prebuilt.libraryDecorator.setNoStdlibs()
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
func (library *snapshotLibraryDecorator) MatchesWithDevice(config android.DeviceConfig) bool {
|
||||
arches := config.Arches()
|
||||
if len(arches) == 0 || arches[0].ArchType.String() != library.Arch() {
|
||||
|
Reference in New Issue
Block a user