Merge "Remove the arch-based filtering hack in packaging.go"
This commit is contained in:
commit
f10995b7b6
|
@ -153,15 +153,9 @@ func (p *PackagingBase) AddDeps(ctx BottomUpMutatorContext, depTag blueprint.Dep
|
||||||
|
|
||||||
// See PackageModule.CopyDepsToZip
|
// See PackageModule.CopyDepsToZip
|
||||||
func (p *PackagingBase) CopyDepsToZip(ctx ModuleContext, zipOut OutputPath) (entries []string) {
|
func (p *PackagingBase) CopyDepsToZip(ctx ModuleContext, zipOut OutputPath) (entries []string) {
|
||||||
var supportedArches []string
|
|
||||||
for _, t := range p.getSupportedTargets(ctx) {
|
|
||||||
supportedArches = append(supportedArches, t.Arch.ArchType.String())
|
|
||||||
}
|
|
||||||
m := make(map[string]PackagingSpec)
|
m := make(map[string]PackagingSpec)
|
||||||
ctx.WalkDeps(func(child Module, parent Module) bool {
|
ctx.WalkDeps(func(child Module, parent Module) bool {
|
||||||
// Don't track modules with unsupported arch
|
if !IsInstallDepNeeded(ctx.OtherModuleDependencyTag(child)) {
|
||||||
// TODO(jiyong): remove this when aosp/1501613 lands.
|
|
||||||
if !InList(child.Target().Arch.ArchType.String(), supportedArches) {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, ps := range child.PackagingSpecs() {
|
for _, ps := range child.PackagingSpecs() {
|
||||||
|
|
|
@ -29,6 +29,12 @@ type componentTestModule struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dep tag used in this test. All dependencies are considered as installable.
|
||||||
|
type installDepTag struct {
|
||||||
|
blueprint.BaseDependencyTag
|
||||||
|
InstallAlwaysNeededDependencyTag
|
||||||
|
}
|
||||||
|
|
||||||
func componentTestModuleFactory() Module {
|
func componentTestModuleFactory() Module {
|
||||||
m := &componentTestModule{}
|
m := &componentTestModule{}
|
||||||
m.AddProperties(&m.props)
|
m.AddProperties(&m.props)
|
||||||
|
@ -37,7 +43,7 @@ func componentTestModuleFactory() Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *componentTestModule) DepsMutator(ctx BottomUpMutatorContext) {
|
func (m *componentTestModule) DepsMutator(ctx BottomUpMutatorContext) {
|
||||||
ctx.AddDependency(ctx.Module(), nil, m.props.Deps...)
|
ctx.AddDependency(ctx.Module(), installDepTag{}, m.props.Deps...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *componentTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
func (m *componentTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||||
|
@ -63,7 +69,7 @@ func packageTestModuleFactory() Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *packageTestModule) DepsMutator(ctx BottomUpMutatorContext) {
|
func (m *packageTestModule) DepsMutator(ctx BottomUpMutatorContext) {
|
||||||
m.AddDeps(ctx, struct{ blueprint.BaseDependencyTag }{})
|
m.AddDeps(ctx, installDepTag{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *packageTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
func (m *packageTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||||
|
|
2
cc/cc.go
2
cc/cc.go
|
@ -584,7 +584,7 @@ var (
|
||||||
genHeaderExportDepTag = dependencyTag{name: "gen header export"}
|
genHeaderExportDepTag = dependencyTag{name: "gen header export"}
|
||||||
objDepTag = dependencyTag{name: "obj"}
|
objDepTag = dependencyTag{name: "obj"}
|
||||||
linkerFlagsDepTag = dependencyTag{name: "linker flags file"}
|
linkerFlagsDepTag = dependencyTag{name: "linker flags file"}
|
||||||
dynamicLinkerDepTag = dependencyTag{name: "dynamic linker"}
|
dynamicLinkerDepTag = installDependencyTag{name: "dynamic linker"}
|
||||||
reuseObjTag = dependencyTag{name: "reuse objects"}
|
reuseObjTag = dependencyTag{name: "reuse objects"}
|
||||||
staticVariantTag = dependencyTag{name: "static variant"}
|
staticVariantTag = dependencyTag{name: "static variant"}
|
||||||
vndkExtDepTag = dependencyTag{name: "vndk extends"}
|
vndkExtDepTag = dependencyTag{name: "vndk extends"}
|
||||||
|
|
Loading…
Reference in New Issue