Use proptools.CloneEmptyProperties

CloneEmptyProperties is much faster than CloneProperties followed
by ZeroProperties.  Cuts >100ms off soong_build runtime, which will
become more important when we start calling soong_build a second
time to automatically generate documentation.

Change-Id: I45d948b36d9937a21b13dab068c3ce9a60b5a59b
This commit is contained in:
Colin Cross 2015-05-19 13:03:01 -07:00
parent d81496084b
commit 3ab7d8835f
1 changed files with 1 additions and 2 deletions

View File

@ -377,8 +377,7 @@ func InitArchModule(m AndroidModule, defaultMultilib Multilib,
archProperties := &archProperties{}
forEachInterface(reflect.ValueOf(archProperties), func(v reflect.Value) {
newValue := proptools.CloneProperties(propertiesValue)
proptools.ZeroProperties(newValue.Elem())
newValue := proptools.CloneEmptyProperties(propertiesValue)
v.Set(newValue)
})