Add exclude_from_vendor_snapshot property, related logic

When building a vendor snapshot, the general rule the
build system uses to select a module for inclusion into
the vendor snapshot is if it's a framework module.
However, there are cases where a partner may modify the
framework module, thereby assuming control of that
module.

This change adds the exclude_from_vendor_snapshot
property allowing the partner to mark a module that
would normally be included in the vendor snapshot for
exclusion. This module is then built from source when
building the vendor image against the vendor snapshot.

Bug: 165705527
Test: m nothing
Test: build partner code against vendor snapshot
Change-Id: I6c5c15f13eeeb8f29717a4abd84b65fa72096889
This commit is contained in:
Bill Peckham
2020-08-31 16:07:58 -07:00
parent 3652018b83
commit 945441c09a
7 changed files with 282 additions and 12 deletions

View File

@@ -61,7 +61,7 @@ func (s *snapshotMap) get(name string, arch android.ArchType) (snapshot string,
func isSnapshotAware(ctx android.ModuleContext, m *Module) bool {
if _, _, ok := isVndkSnapshotLibrary(ctx.DeviceConfig(), m); ok {
return ctx.Config().VndkSnapshotBuildArtifacts()
} else if isVendorSnapshotModule(m, ctx.ModuleDir()) {
} else if isVendorSnapshotModule(m, isVendorProprietaryPath(ctx.ModuleDir())) {
return true
}
return false