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
diff --git a/common/arch.go b/common/arch.go
index 2a09ae9..4ea0f26 100644
--- a/common/arch.go
+++ b/common/arch.go
@@ -377,8 +377,7 @@
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)
})