aboutsummaryrefslogtreecommitdiffstats
path: root/common/module.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-06-17 14:20:06 -0700
committerColin Cross <ccross@android.com>2015-07-09 17:57:18 -0700
commit463a90e5872d6c8cf26a2302e7ad1586957304a0 (patch)
tree3d8001008839eff93d224dc2411be26842a7f9ad /common/module.go
parent3fde0c220aa0c43ef125f0156d27499622b59b61 (diff)
downloadbuild_soong-463a90e5872d6c8cf26a2302e7ad1586957304a0.tar.gz
build_soong-463a90e5872d6c8cf26a2302e7ad1586957304a0.tar.bz2
build_soong-463a90e5872d6c8cf26a2302e7ad1586957304a0.zip
use init functions to register module types, etc.
Instead of putting all the blueprint registrations in soong_build, put them all in init() functions. This puts the registration next to the implementation. Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
Diffstat (limited to 'common/module.go')
-rw-r--r--common/module.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/module.go b/common/module.go
index 1d17de10..b19b6d1c 100644
--- a/common/module.go
+++ b/common/module.go
@@ -15,6 +15,7 @@
package common
import (
+ "android/soong"
"path/filepath"
"runtime"
"sort"
@@ -520,6 +521,10 @@ func (ctx *androidModuleContext) Glob(globPattern string, excludes []string) []s
return ret
}
+func init() {
+ soong.RegisterSingletonType("buildtarget", BuildTargetSingleton)
+}
+
func BuildTargetSingleton() blueprint.Singleton {
return &buildTargetSingleton{}
}