Merge "Check base
property before using it" am: 83f107cdfb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1345378 Change-Id: I12b2bf1485a4dc7fdb6664de15a422bf257152f1
This commit is contained in:
@@ -223,6 +223,11 @@ var overrideBaseDepTag overrideBaseDependencyTag
|
|||||||
// next phase.
|
// next phase.
|
||||||
func overrideModuleDepsMutator(ctx BottomUpMutatorContext) {
|
func overrideModuleDepsMutator(ctx BottomUpMutatorContext) {
|
||||||
if module, ok := ctx.Module().(OverrideModule); ok {
|
if module, ok := ctx.Module().(OverrideModule); ok {
|
||||||
|
base := String(module.getOverrideModuleProperties().Base)
|
||||||
|
if !ctx.OtherModuleExists(base) {
|
||||||
|
ctx.PropertyErrorf("base", "%q is not a valid module name", base)
|
||||||
|
return
|
||||||
|
}
|
||||||
// See if there's a prebuilt module that overrides this override module with prefer flag,
|
// See if there's a prebuilt module that overrides this override module with prefer flag,
|
||||||
// in which case we call SkipInstall on the corresponding variant later.
|
// in which case we call SkipInstall on the corresponding variant later.
|
||||||
ctx.VisitDirectDepsWithTag(PrebuiltDepTag, func(dep Module) {
|
ctx.VisitDirectDepsWithTag(PrebuiltDepTag, func(dep Module) {
|
||||||
|
Reference in New Issue
Block a user