diff options
author | Colin Cross <ccross@android.com> | 2015-06-17 14:20:06 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-07-09 17:57:18 -0700 |
commit | 463a90e5872d6c8cf26a2302e7ad1586957304a0 (patch) | |
tree | 3d8001008839eff93d224dc2411be26842a7f9ad /common/arch.go | |
parent | 3fde0c220aa0c43ef125f0156d27499622b59b61 (diff) | |
download | build_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/arch.go')
-rw-r--r-- | common/arch.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/arch.go b/common/arch.go index 6865904d..c0e63eb0 100644 --- a/common/arch.go +++ b/common/arch.go @@ -20,10 +20,17 @@ import ( "runtime" "strings" + "android/soong" + "github.com/google/blueprint" "github.com/google/blueprint/proptools" ) +func init() { + soong.RegisterEarlyMutator("host_or_device", HostOrDeviceMutator) + soong.RegisterEarlyMutator("arch", ArchMutator) +} + var ( Arm = newArch("arm", "lib32") Arm64 = newArch("arm64", "lib64") |