Merge "Remove 6 install related fields from ModuleBase." into main am: 3e4458bf52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3245217 Change-Id: Iad60c890b14ced77921ca70b42fb71a102a70389 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -592,10 +592,10 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint
|
||||
}
|
||||
|
||||
if !base.InVendorRamdisk() {
|
||||
a.AddPaths("LOCAL_FULL_INIT_RC", base.initRcPaths)
|
||||
a.AddPaths("LOCAL_FULL_INIT_RC", info.InitRcPaths)
|
||||
}
|
||||
if len(base.vintfFragmentsPaths) > 0 {
|
||||
a.AddPaths("LOCAL_FULL_VINTF_FRAGMENTS", base.vintfFragmentsPaths)
|
||||
if len(info.VintfFragmentsPaths) > 0 {
|
||||
a.AddPaths("LOCAL_FULL_VINTF_FRAGMENTS", info.VintfFragmentsPaths)
|
||||
}
|
||||
a.SetBoolIfTrue("LOCAL_PROPRIETARY_MODULE", Bool(base.commonProperties.Proprietary))
|
||||
if Bool(base.commonProperties.Vendor) || Bool(base.commonProperties.Soc_specific) {
|
||||
|
@@ -189,8 +189,8 @@ func buildComplianceMetadataProvider(ctx *moduleContext, m *ModuleBase) {
|
||||
installed = append(installed, ctx.installFiles...)
|
||||
installed = append(installed, ctx.katiInstalls.InstallPaths()...)
|
||||
installed = append(installed, ctx.katiSymlinks.InstallPaths()...)
|
||||
installed = append(installed, m.katiInitRcInstalls.InstallPaths()...)
|
||||
installed = append(installed, m.katiVintfInstalls.InstallPaths()...)
|
||||
installed = append(installed, ctx.katiInitRcInstalls.InstallPaths()...)
|
||||
installed = append(installed, ctx.katiVintfInstalls.InstallPaths()...)
|
||||
complianceMetadataInfo.SetListValue(ComplianceMetadataProp.INSTALLED_FILES, FirstUniqueStrings(installed.Strings()))
|
||||
}
|
||||
ctx.setProvider(ComplianceMetadataProvider, complianceMetadataInfo)
|
||||
|
@@ -281,8 +281,8 @@ func (s *makeVarsSingleton) GenerateBuildActions(ctx SingletonContext) {
|
||||
if m.ExportedToMake() {
|
||||
info := OtherModuleProviderOrDefault(ctx, m, InstallFilesProvider)
|
||||
katiInstalls = append(katiInstalls, info.KatiInstalls...)
|
||||
katiInitRcInstalls = append(katiInitRcInstalls, m.base().katiInitRcInstalls...)
|
||||
katiVintfManifestInstalls = append(katiVintfManifestInstalls, m.base().katiVintfInstalls...)
|
||||
katiInitRcInstalls = append(katiInitRcInstalls, info.KatiInitRcInstalls...)
|
||||
katiVintfManifestInstalls = append(katiVintfManifestInstalls, info.KatiVintfInstalls...)
|
||||
katiSymlinks = append(katiSymlinks, info.KatiSymlinks...)
|
||||
}
|
||||
})
|
||||
|
@@ -87,8 +87,6 @@ type Module interface {
|
||||
ReplacedByPrebuilt()
|
||||
IsReplacedByPrebuilt() bool
|
||||
ExportedToMake() bool
|
||||
InitRc() Paths
|
||||
VintfFragments() Paths
|
||||
EffectiveLicenseKinds() []string
|
||||
EffectiveLicenseFiles() Paths
|
||||
|
||||
@@ -837,10 +835,6 @@ type ModuleBase struct {
|
||||
|
||||
noAddressSanitizer bool
|
||||
packagingSpecsDepSet *DepSet[PackagingSpec]
|
||||
// katiInitRcInstalls and katiVintfInstalls track the install rules created by Soong that are
|
||||
// allowed to have duplicates across modules and variants.
|
||||
katiInitRcInstalls katiInstalls
|
||||
katiVintfInstalls katiInstalls
|
||||
|
||||
hooks hooks
|
||||
|
||||
@@ -851,12 +845,6 @@ type ModuleBase struct {
|
||||
ruleParams map[blueprint.Rule]blueprint.RuleParams
|
||||
variables map[string]string
|
||||
|
||||
initRcPaths Paths
|
||||
vintfFragmentsPaths Paths
|
||||
|
||||
installedInitRcPaths InstallPaths
|
||||
installedVintfFragmentsPaths InstallPaths
|
||||
|
||||
// Merged Aconfig files for all transitive deps.
|
||||
aconfigFilePaths Paths
|
||||
|
||||
@@ -1584,18 +1572,6 @@ func (m *ModuleBase) VintfFragmentModuleNames(ctx ConfigAndErrorContext) []strin
|
||||
return m.base().commonProperties.Vintf_fragment_modules.GetOrDefault(m.ConfigurableEvaluator(ctx), nil)
|
||||
}
|
||||
|
||||
func (m *ModuleBase) InitRc() Paths {
|
||||
return append(Paths{}, m.initRcPaths...)
|
||||
}
|
||||
|
||||
func (m *ModuleBase) VintfFragments() Paths {
|
||||
return append(Paths{}, m.vintfFragmentsPaths...)
|
||||
}
|
||||
|
||||
func (m *ModuleBase) CompileMultilib() *string {
|
||||
return m.base().commonProperties.Compile_multilib
|
||||
}
|
||||
|
||||
func (m *ModuleBase) generateModuleTarget(ctx *moduleContext) {
|
||||
var allInstalledFiles InstallPaths
|
||||
var allCheckbuildFiles Paths
|
||||
@@ -1771,6 +1747,15 @@ type InstallFilesInfo struct {
|
||||
// The following fields are private before, make it private again once we have
|
||||
// better solution.
|
||||
TransitiveInstallFiles *DepSet[InstallPath]
|
||||
// katiInitRcInstalls and katiVintfInstalls track the install rules created by Soong that are
|
||||
// allowed to have duplicates across modules and variants.
|
||||
KatiInitRcInstalls katiInstalls
|
||||
KatiVintfInstalls katiInstalls
|
||||
InitRcPaths Paths
|
||||
VintfFragmentsPaths Paths
|
||||
InstalledInitRcPaths InstallPaths
|
||||
InstalledVintfFragmentsPaths InstallPaths
|
||||
|
||||
// The files to copy to the dist as explicitly specified in the .bp file.
|
||||
DistFiles TaggedDistFiles
|
||||
}
|
||||
@@ -1867,30 +1852,36 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
|
||||
// so only a single rule is created for each init.rc or vintf fragment file.
|
||||
|
||||
if !m.InVendorRamdisk() {
|
||||
m.initRcPaths = PathsForModuleSrc(ctx, m.commonProperties.Init_rc)
|
||||
ctx.initRcPaths = PathsForModuleSrc(ctx, m.commonProperties.Init_rc)
|
||||
rcDir := PathForModuleInstall(ctx, "etc", "init")
|
||||
for _, src := range m.initRcPaths {
|
||||
for _, src := range ctx.initRcPaths {
|
||||
installedInitRc := rcDir.Join(ctx, src.Base())
|
||||
m.katiInitRcInstalls = append(m.katiInitRcInstalls, katiInstall{
|
||||
ctx.katiInitRcInstalls = append(ctx.katiInitRcInstalls, katiInstall{
|
||||
from: src,
|
||||
to: installedInitRc,
|
||||
})
|
||||
ctx.PackageFile(rcDir, src.Base(), src)
|
||||
m.installedInitRcPaths = append(m.installedInitRcPaths, installedInitRc)
|
||||
ctx.installedInitRcPaths = append(ctx.installedInitRcPaths, installedInitRc)
|
||||
}
|
||||
installFiles.InitRcPaths = ctx.initRcPaths
|
||||
installFiles.KatiInitRcInstalls = ctx.katiInitRcInstalls
|
||||
installFiles.InstalledInitRcPaths = ctx.installedInitRcPaths
|
||||
}
|
||||
|
||||
m.vintfFragmentsPaths = PathsForModuleSrc(ctx, m.commonProperties.Vintf_fragments.GetOrDefault(ctx, nil))
|
||||
ctx.vintfFragmentsPaths = PathsForModuleSrc(ctx, m.commonProperties.Vintf_fragments.GetOrDefault(ctx, nil))
|
||||
vintfDir := PathForModuleInstall(ctx, "etc", "vintf", "manifest")
|
||||
for _, src := range m.vintfFragmentsPaths {
|
||||
for _, src := range ctx.vintfFragmentsPaths {
|
||||
installedVintfFragment := vintfDir.Join(ctx, src.Base())
|
||||
m.katiVintfInstalls = append(m.katiVintfInstalls, katiInstall{
|
||||
ctx.katiVintfInstalls = append(ctx.katiVintfInstalls, katiInstall{
|
||||
from: src,
|
||||
to: installedVintfFragment,
|
||||
})
|
||||
ctx.PackageFile(vintfDir, src.Base(), src)
|
||||
m.installedVintfFragmentsPaths = append(m.installedVintfFragmentsPaths, installedVintfFragment)
|
||||
ctx.installedVintfFragmentsPaths = append(ctx.installedVintfFragmentsPaths, installedVintfFragment)
|
||||
}
|
||||
installFiles.VintfFragmentsPaths = ctx.vintfFragmentsPaths
|
||||
installFiles.KatiVintfInstalls = ctx.katiVintfInstalls
|
||||
installFiles.InstalledVintfFragmentsPaths = ctx.installedVintfFragmentsPaths
|
||||
}
|
||||
|
||||
licensesPropertyFlattener(ctx)
|
||||
@@ -2005,8 +1996,8 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
|
||||
var installed InstallPaths
|
||||
installed = append(installed, ctx.katiInstalls.InstallPaths()...)
|
||||
installed = append(installed, ctx.katiSymlinks.InstallPaths()...)
|
||||
installed = append(installed, m.katiInitRcInstalls.InstallPaths()...)
|
||||
installed = append(installed, m.katiVintfInstalls.InstallPaths()...)
|
||||
installed = append(installed, ctx.katiInitRcInstalls.InstallPaths()...)
|
||||
installed = append(installed, ctx.katiVintfInstalls.InstallPaths()...)
|
||||
installedStrings := installed.Strings()
|
||||
|
||||
var targetRequired, hostRequired []string
|
||||
|
@@ -251,6 +251,14 @@ type moduleContext struct {
|
||||
|
||||
katiInstalls katiInstalls
|
||||
katiSymlinks katiInstalls
|
||||
// katiInitRcInstalls and katiVintfInstalls track the install rules created by Soong that are
|
||||
// allowed to have duplicates across modules and variants.
|
||||
katiInitRcInstalls katiInstalls
|
||||
katiVintfInstalls katiInstalls
|
||||
initRcPaths Paths
|
||||
vintfFragmentsPaths Paths
|
||||
installedInitRcPaths InstallPaths
|
||||
installedVintfFragmentsPaths InstallPaths
|
||||
|
||||
testData []DataPath
|
||||
|
||||
@@ -535,8 +543,8 @@ func (m *moduleContext) installFile(installPath InstallPath, name string, srcPat
|
||||
|
||||
if m.requiresFullInstall() {
|
||||
deps = append(deps, InstallPaths(m.TransitiveInstallFiles.ToList())...)
|
||||
deps = append(deps, m.module.base().installedInitRcPaths...)
|
||||
deps = append(deps, m.module.base().installedVintfFragmentsPaths...)
|
||||
deps = append(deps, m.installedInitRcPaths...)
|
||||
deps = append(deps, m.installedVintfFragmentsPaths...)
|
||||
|
||||
var implicitDeps, orderOnlyDeps Paths
|
||||
|
||||
|
Reference in New Issue
Block a user