Add support for genrule

Add genrule, which uses a host executable (possibly built by the
build system) to generate a single source file.  This differs slightly
from gensrcs, which takes a list of sources and translates them through
a host executable to individual source files.

Change-Id: I94bda62c4c53fb3f3817def190e6a7561508d297
diff --git a/cc/cc.go b/cc/cc.go
index 6394100..df5fc57 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1202,6 +1202,7 @@
 type CCBinary struct {
 	CCLinked
 	out              string
+	installFile      string
 	BinaryProperties struct {
 		// static_executable: compile executable with -static
 		Static_executable bool
@@ -1349,7 +1350,14 @@
 }
 
 func (c *CCBinary) installModule(ctx common.AndroidModuleContext, flags CCFlags) {
-	ctx.InstallFile(filepath.Join("bin", c.Properties.Relative_install_path), c.out)
+	c.installFile = ctx.InstallFile(filepath.Join("bin", c.Properties.Relative_install_path), c.out)
+}
+
+func (c *CCBinary) HostToolPath() string {
+	if c.HostOrDevice().Host() {
+		return c.installFile
+	}
+	return ""
 }
 
 type CCTest struct {