Add D8 support

Bug: 67754178
Test: m -j32 checkbuild && USE_D8=true m -j32 checkbuild

Change-Id: If63afc10ceb5e753bbb7f195bb8a895eaef10775
diff --git a/android/package_ctx.go b/android/package_ctx.go
index 6743fb3..f781dd4 100644
--- a/android/package_ctx.go
+++ b/android/package_ctx.go
@@ -117,15 +117,23 @@
 // package-scoped variable's initialization.
 func (p AndroidPackageContext) HostBinToolVariable(name, path string) blueprint.Variable {
 	return p.VariableFunc(name, func(config interface{}) (string, error) {
-		ctx := &configErrorWrapper{p, config.(Config), []error{}}
-		p := PathForOutput(ctx, "host", ctx.config.PrebuiltOS(), "bin", path)
-		if len(ctx.errors) > 0 {
-			return "", ctx.errors[0]
+		po, err := p.HostBinToolPath(config, path)
+		if err != nil {
+			return "", err
 		}
-		return p.String(), nil
+		return po.String(), nil
 	})
 }
 
+func (p AndroidPackageContext) HostBinToolPath(config interface{}, path string) (Path, error) {
+	ctx := &configErrorWrapper{p, config.(Config), []error{}}
+	pa := PathForOutput(ctx, "host", ctx.config.PrebuiltOS(), "bin", path)
+	if len(ctx.errors) > 0 {
+		return nil, ctx.errors[0]
+	}
+	return pa, nil
+}
+
 // HostJavaToolVariable returns a Variable whose value is the path to a host
 // tool in the frameworks directory for host targets. It may only be called
 // during a Go package's initialization - either from the init() function or as