Merge "Add module based host-tools snapshot"

This commit is contained in:
Rob Seymour
2021-09-14 14:47:03 +00:00
committed by Gerrit Code Review
15 changed files with 642 additions and 20 deletions

View File

@@ -31,6 +31,7 @@ import (
"android/soong/cc/config"
"android/soong/fuzz"
"android/soong/genrule"
"android/soong/snapshot"
)
func init() {
@@ -3401,6 +3402,8 @@ func (c *Module) AlwaysRequiresPlatformApexVariant() bool {
return c.IsStubs() || c.Target().NativeBridge == android.NativeBridgeEnabled
}
var _ snapshot.RelativeInstallPath = (*Module)(nil)
//
// Defaults
//

View File

@@ -132,12 +132,9 @@ func isSnapshotAware(cfg android.DeviceConfig, m LinkableInterface, inProprietar
return false
}
// This is to be saved as .json files, which is for development/vendor_snapshot/update.py.
// These flags become Android.bp snapshot module properties.
// Extend the snapshot.SnapshotJsonFlags to include cc specific fields.
type snapshotJsonFlags struct {
ModuleName string `json:",omitempty"`
RelativeInstallPath string `json:",omitempty"`
snapshot.SnapshotJsonFlags
// library flags
ExportedDirs []string `json:",omitempty"`
ExportedSystemDirs []string `json:",omitempty"`
@@ -154,7 +151,6 @@ type snapshotJsonFlags struct {
SharedLibs []string `json:",omitempty"`
StaticLibs []string `json:",omitempty"`
RuntimeLibs []string `json:",omitempty"`
Required []string `json:",omitempty"`
// extra config files
InitRc []string `json:",omitempty"`