Merge "Improve error messages for missing dependencies" am: 5e2697117f

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516937

Change-Id: I00cd348627ea3ec14b864142aed0bd3ba895ead4
This commit is contained in:
Paul Duffin
2020-12-07 11:04:16 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 5 deletions

View File

@@ -506,7 +506,7 @@ func buildBootImage(ctx android.SingletonContext, image *bootImageConfig) *bootI
m := image.modules.Jar(i) m := image.modules.Jar(i)
if ctx.Config().AllowMissingDependencies() { if ctx.Config().AllowMissingDependencies() {
missingDeps = append(missingDeps, m) missingDeps = append(missingDeps, m)
bootDexJars[i] = android.PathForOutput(ctx, "missing") bootDexJars[i] = android.PathForOutput(ctx, "missing/module", m, "from/apex", image.modules.Apex(i))
} else { } else {
ctx.Errorf("failed to find a dex jar path for module '%s'"+ ctx.Errorf("failed to find a dex jar path for module '%s'"+
", note that some jars may be filtered out by module constraints", m) ", note that some jars may be filtered out by module constraints", m)
@@ -779,7 +779,7 @@ func bootFrameworkProfileRule(ctx android.SingletonContext, image *bootImageConf
bootFrameworkProfile = path.Path() bootFrameworkProfile = path.Path()
} else { } else {
missingDeps = append(missingDeps, defaultProfile) missingDeps = append(missingDeps, defaultProfile)
bootFrameworkProfile = android.PathForOutput(ctx, "missing") bootFrameworkProfile = android.PathForOutput(ctx, "missing", defaultProfile)
} }
profile := image.dir.Join(ctx, "boot.bprof") profile := image.dir.Join(ctx, "boot.bprof")

View File

@@ -177,12 +177,13 @@ func stubFlagsRule(ctx android.SingletonContext) {
for moduleList, pathList := range moduleListToPathList { for moduleList, pathList := range moduleListToPathList {
for i := range pathList { for i := range pathList {
if pathList[i] == nil { if pathList[i] == nil {
pathList[i] = android.PathForOutput(ctx, "missing") moduleName := (*moduleList)[i]
pathList[i] = android.PathForOutput(ctx, "missing/module", moduleName)
if ctx.Config().AllowMissingDependencies() { if ctx.Config().AllowMissingDependencies() {
missingDeps = append(missingDeps, (*moduleList)[i]) missingDeps = append(missingDeps, moduleName)
} else { } else {
ctx.Errorf("failed to find dex jar path for module %q", ctx.Errorf("failed to find dex jar path for module %q",
(*moduleList)[i]) moduleName)
} }
} }
} }