Build Go tools for arm
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: I915be7bb7451f27fcd4beba5e6487da7a01639a6
diff --git a/android/paths.go b/android/paths.go
index 1c0321c..a020d8a 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -209,6 +209,10 @@
var _ ModuleErrorfContext = blueprint.ModuleContext(nil)
+type AddMissingDependenciesContext interface {
+ AddMissingDependencies([]string)
+}
+
// reportPathError will register an error with the attached context. It
// attempts ctx.ModuleErrorf for a better error message first, then falls
// back to ctx.Errorf.
@@ -220,7 +224,9 @@
// attempts ctx.ModuleErrorf for a better error message first, then falls
// back to ctx.Errorf.
func ReportPathErrorf(ctx PathContext, format string, args ...interface{}) {
- if mctx, ok := ctx.(ModuleErrorfContext); ok {
+ if mctx, ok := ctx.(AddMissingDependenciesContext); ok && ctx.Config().AllowMissingDependencies() {
+ mctx.AddMissingDependencies([]string{fmt.Sprintf(format, args...)})
+ } else if mctx, ok := ctx.(ModuleErrorfContext); ok {
mctx.ModuleErrorf(format, args...)
} else if ectx, ok := ctx.(errorfContext); ok {
ectx.Errorf(format, args...)