Initial prebuilt support

Support prebuilt shared libraries as an initial proof-of-concept of
prebuilts.  Future changes will support binaries and static libraries,
and the ability to select which to use based on something besides
blueprint properties.

Test: TestPrebuilts run during m -j
Change-Id: I6e84da667e9005ae11844bad01d25cbe4ced1ce3
diff --git a/android/module.go b/android/module.go
index 52280d2..572b162 100644
--- a/android/module.go
+++ b/android/module.go
@@ -147,6 +147,8 @@
 	// Set by InitAndroidModule
 	HostOrDeviceSupported HostOrDeviceSupported `blueprint:"mutated"`
 	ArchSpecific          bool                  `blueprint:"mutated"`
+
+	SkipInstall bool `blueprint:"mutated"`
 }
 
 type hostAndDeviceProperties struct {
@@ -277,10 +279,17 @@
 	hooks hooks
 }
 
+// Name returns the name of the module.  It may be overridden by individual module types, for
+// example prebuilts will prepend prebuilt_ to the name.
 func (a *ModuleBase) Name() string {
 	return a.nameProperties.Name
 }
 
+// BaseModuleName returns the name of the module as specified in the blueprints file.
+func (a *ModuleBase) BaseModuleName() string {
+	return a.nameProperties.Name
+}
+
 func (a *ModuleBase) base() *ModuleBase {
 	return a
 }
@@ -348,6 +357,10 @@
 	return *a.commonProperties.Enabled
 }
 
+func (a *ModuleBase) SkipInstall() {
+	a.commonProperties.SkipInstall = true
+}
+
 func (a *ModuleBase) computeInstallDeps(
 	ctx blueprint.ModuleContext) Paths {
 
@@ -600,7 +613,9 @@
 	fullInstallPath := installPath.Join(a, name)
 	a.module.base().hooks.runInstallHooks(a, fullInstallPath, false)
 
-	if a.Host() || !a.AConfig().SkipDeviceInstall() {
+	if !a.module.base().commonProperties.SkipInstall &&
+		(a.Host() || !a.AConfig().SkipDeviceInstall()) {
+
 		deps = append(deps, a.installDeps...)
 
 		var implicitDeps, orderOnlyDeps Paths
@@ -636,7 +651,9 @@
 	fullInstallPath := installPath.Join(a, name)
 	a.module.base().hooks.runInstallHooks(a, fullInstallPath, true)
 
-	if a.Host() || !a.AConfig().SkipDeviceInstall() {
+	if !a.module.base().commonProperties.SkipInstall &&
+		(a.Host() || !a.AConfig().SkipDeviceInstall()) {
+
 		a.ModuleBuild(pctx, ModuleBuildParams{
 			Rule:      Symlink,
 			Output:    fullInstallPath,