Loading android/module_context.go +10 −11 Original line number Diff line number Diff line Loading @@ -16,14 +16,13 @@ package android import ( "fmt" "github.com/google/blueprint/depset" "path" "path/filepath" "strings" "github.com/google/blueprint" "github.com/google/blueprint/depset" "github.com/google/blueprint/proptools" "github.com/google/blueprint/uniquelist" ) // BuildParameters describes the set of potential parameters to build a Ninja rule. Loading Loading @@ -555,8 +554,8 @@ func (m *moduleContext) PackageFile(installPath InstallPath, name string, srcPat return m.packageFile(fullInstallPath, srcPath, false) } func (m *moduleContext) getAconfigPaths() Paths { return m.aconfigFilePaths func (m *moduleContext) getAconfigPaths() *Paths { return &m.aconfigFilePaths } func (m *moduleContext) setAconfigPaths(paths Paths) { Loading @@ -571,12 +570,12 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e srcPath: srcPath, symlinkTarget: "", executable: executable, effectiveLicenseFiles: uniquelist.Make(licenseFiles), effectiveLicenseFiles: &licenseFiles, partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: uniquelist.Make(m.getAconfigPaths()), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, overrides: uniquelist.Make(overrides), overrides: &overrides, owner: m.ModuleName(), } m.packagingSpecs = append(m.packagingSpecs, spec) Loading Loading @@ -704,9 +703,9 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src executable: false, partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: uniquelist.Make(m.getAconfigPaths()), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, overrides: uniquelist.Make(overrides), overrides: &overrides, owner: m.ModuleName(), }) Loading Loading @@ -751,9 +750,9 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str executable: false, partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: uniquelist.Make(m.getAconfigPaths()), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, overrides: uniquelist.Make(overrides), overrides: &overrides, owner: m.ModuleName(), }) Loading android/packaging.go +20 −16 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import ( "github.com/google/blueprint" "github.com/google/blueprint/gobtools" "github.com/google/blueprint/proptools" "github.com/google/blueprint/uniquelist" ) // PackagingSpec abstracts a request to place a built artifact at a certain path in a package. A Loading @@ -44,7 +43,7 @@ type PackagingSpec struct { // Whether relPathInPackage should be marked as executable or not executable bool effectiveLicenseFiles uniquelist.UniqueList[Path] effectiveLicenseFiles *Paths partition string Loading @@ -54,13 +53,13 @@ type PackagingSpec struct { skipInstall bool // Paths of aconfig files for the built artifact aconfigPaths uniquelist.UniqueList[Path] aconfigPaths *Paths // ArchType of the module which produced this packaging spec archType ArchType // List of module names that this packaging spec overrides overrides uniquelist.UniqueList[string] overrides *[]string // Name of the module where this packaging spec is output of owner string Loading @@ -71,12 +70,12 @@ type packagingSpecGob struct { SrcPath Path SymlinkTarget string Executable bool EffectiveLicenseFiles Paths EffectiveLicenseFiles *Paths Partition string SkipInstall bool AconfigPaths Paths AconfigPaths *Paths ArchType ArchType Overrides []string Overrides *[]string Owner string } Loading @@ -86,12 +85,12 @@ func (p *PackagingSpec) ToGob() *packagingSpecGob { SrcPath: p.srcPath, SymlinkTarget: p.symlinkTarget, Executable: p.executable, EffectiveLicenseFiles: p.effectiveLicenseFiles.ToSlice(), EffectiveLicenseFiles: p.effectiveLicenseFiles, Partition: p.partition, SkipInstall: p.skipInstall, AconfigPaths: p.aconfigPaths.ToSlice(), AconfigPaths: p.aconfigPaths, ArchType: p.archType, Overrides: p.overrides.ToSlice(), Overrides: p.overrides, Owner: p.owner, } } Loading @@ -101,12 +100,12 @@ func (p *PackagingSpec) FromGob(data *packagingSpecGob) { p.srcPath = data.SrcPath p.symlinkTarget = data.SymlinkTarget p.executable = data.Executable p.effectiveLicenseFiles = uniquelist.Make(data.EffectiveLicenseFiles) p.effectiveLicenseFiles = data.EffectiveLicenseFiles p.partition = data.Partition p.skipInstall = data.SkipInstall p.aconfigPaths = uniquelist.Make(data.AconfigPaths) p.aconfigPaths = data.AconfigPaths p.archType = data.ArchType p.overrides = uniquelist.Make(data.Overrides) p.overrides = data.Overrides p.owner = data.Owner } Loading Loading @@ -156,7 +155,10 @@ func (p *PackagingSpec) SetRelPathInPackage(relPathInPackage string) { } func (p *PackagingSpec) EffectiveLicenseFiles() Paths { return p.effectiveLicenseFiles.ToSlice() if p.effectiveLicenseFiles == nil { return Paths{} } return *p.effectiveLicenseFiles } func (p *PackagingSpec) Partition() string { Loading @@ -169,7 +171,7 @@ func (p *PackagingSpec) SkipInstall() bool { // Paths of aconfig files for the built artifact func (p *PackagingSpec) GetAconfigPaths() Paths { return p.aconfigPaths.ToSlice() return *p.aconfigPaths } type PackageModule interface { Loading Loading @@ -434,7 +436,9 @@ func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter } all = append(all, ps) depNames = append(depNames, child.Name()) overridden = append(overridden, ps.overrides.ToSlice()...) if ps.overrides != nil { overridden = append(overridden, *ps.overrides...) } } }) Loading Loading
android/module_context.go +10 −11 Original line number Diff line number Diff line Loading @@ -16,14 +16,13 @@ package android import ( "fmt" "github.com/google/blueprint/depset" "path" "path/filepath" "strings" "github.com/google/blueprint" "github.com/google/blueprint/depset" "github.com/google/blueprint/proptools" "github.com/google/blueprint/uniquelist" ) // BuildParameters describes the set of potential parameters to build a Ninja rule. Loading Loading @@ -555,8 +554,8 @@ func (m *moduleContext) PackageFile(installPath InstallPath, name string, srcPat return m.packageFile(fullInstallPath, srcPath, false) } func (m *moduleContext) getAconfigPaths() Paths { return m.aconfigFilePaths func (m *moduleContext) getAconfigPaths() *Paths { return &m.aconfigFilePaths } func (m *moduleContext) setAconfigPaths(paths Paths) { Loading @@ -571,12 +570,12 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e srcPath: srcPath, symlinkTarget: "", executable: executable, effectiveLicenseFiles: uniquelist.Make(licenseFiles), effectiveLicenseFiles: &licenseFiles, partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: uniquelist.Make(m.getAconfigPaths()), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, overrides: uniquelist.Make(overrides), overrides: &overrides, owner: m.ModuleName(), } m.packagingSpecs = append(m.packagingSpecs, spec) Loading Loading @@ -704,9 +703,9 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src executable: false, partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: uniquelist.Make(m.getAconfigPaths()), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, overrides: uniquelist.Make(overrides), overrides: &overrides, owner: m.ModuleName(), }) Loading Loading @@ -751,9 +750,9 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str executable: false, partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: uniquelist.Make(m.getAconfigPaths()), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, overrides: uniquelist.Make(overrides), overrides: &overrides, owner: m.ModuleName(), }) Loading
android/packaging.go +20 −16 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import ( "github.com/google/blueprint" "github.com/google/blueprint/gobtools" "github.com/google/blueprint/proptools" "github.com/google/blueprint/uniquelist" ) // PackagingSpec abstracts a request to place a built artifact at a certain path in a package. A Loading @@ -44,7 +43,7 @@ type PackagingSpec struct { // Whether relPathInPackage should be marked as executable or not executable bool effectiveLicenseFiles uniquelist.UniqueList[Path] effectiveLicenseFiles *Paths partition string Loading @@ -54,13 +53,13 @@ type PackagingSpec struct { skipInstall bool // Paths of aconfig files for the built artifact aconfigPaths uniquelist.UniqueList[Path] aconfigPaths *Paths // ArchType of the module which produced this packaging spec archType ArchType // List of module names that this packaging spec overrides overrides uniquelist.UniqueList[string] overrides *[]string // Name of the module where this packaging spec is output of owner string Loading @@ -71,12 +70,12 @@ type packagingSpecGob struct { SrcPath Path SymlinkTarget string Executable bool EffectiveLicenseFiles Paths EffectiveLicenseFiles *Paths Partition string SkipInstall bool AconfigPaths Paths AconfigPaths *Paths ArchType ArchType Overrides []string Overrides *[]string Owner string } Loading @@ -86,12 +85,12 @@ func (p *PackagingSpec) ToGob() *packagingSpecGob { SrcPath: p.srcPath, SymlinkTarget: p.symlinkTarget, Executable: p.executable, EffectiveLicenseFiles: p.effectiveLicenseFiles.ToSlice(), EffectiveLicenseFiles: p.effectiveLicenseFiles, Partition: p.partition, SkipInstall: p.skipInstall, AconfigPaths: p.aconfigPaths.ToSlice(), AconfigPaths: p.aconfigPaths, ArchType: p.archType, Overrides: p.overrides.ToSlice(), Overrides: p.overrides, Owner: p.owner, } } Loading @@ -101,12 +100,12 @@ func (p *PackagingSpec) FromGob(data *packagingSpecGob) { p.srcPath = data.SrcPath p.symlinkTarget = data.SymlinkTarget p.executable = data.Executable p.effectiveLicenseFiles = uniquelist.Make(data.EffectiveLicenseFiles) p.effectiveLicenseFiles = data.EffectiveLicenseFiles p.partition = data.Partition p.skipInstall = data.SkipInstall p.aconfigPaths = uniquelist.Make(data.AconfigPaths) p.aconfigPaths = data.AconfigPaths p.archType = data.ArchType p.overrides = uniquelist.Make(data.Overrides) p.overrides = data.Overrides p.owner = data.Owner } Loading Loading @@ -156,7 +155,10 @@ func (p *PackagingSpec) SetRelPathInPackage(relPathInPackage string) { } func (p *PackagingSpec) EffectiveLicenseFiles() Paths { return p.effectiveLicenseFiles.ToSlice() if p.effectiveLicenseFiles == nil { return Paths{} } return *p.effectiveLicenseFiles } func (p *PackagingSpec) Partition() string { Loading @@ -169,7 +171,7 @@ func (p *PackagingSpec) SkipInstall() bool { // Paths of aconfig files for the built artifact func (p *PackagingSpec) GetAconfigPaths() Paths { return p.aconfigPaths.ToSlice() return *p.aconfigPaths } type PackageModule interface { Loading Loading @@ -434,7 +436,9 @@ func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter } all = append(all, ps) depNames = append(depNames, child.Name()) overridden = append(overridden, ps.overrides.ToSlice()...) if ps.overrides != nil { overridden = append(overridden, *ps.overrides...) } } }) Loading