Improve error messages for missing dependencies

Adds some additional information into the paths that are created when
modules are missing in Soong but SOONG_ALLOW_MISSING_DEPENDENCIES=true.

Test: try and build platform against art prebuilts
Bug: 171061220
Change-Id: Ifbcc0af5bdbd15409758a3b6f216cf9b3b5dba31
This commit is contained in:
Paul Duffin
2020-12-03 11:15:58 +00:00
parent 06e7b6d906
commit 7f48eeff59
2 changed files with 6 additions and 5 deletions

View File

@@ -177,12 +177,13 @@ func stubFlagsRule(ctx android.SingletonContext) {
for moduleList, pathList := range moduleListToPathList {
for i := range pathList {
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() {
missingDeps = append(missingDeps, (*moduleList)[i])
missingDeps = append(missingDeps, moduleName)
} else {
ctx.Errorf("failed to find dex jar path for module %q",
(*moduleList)[i])
moduleName)
}
}
}