Add DeviceConfig and OncePer objects

Add DeviceConfig to store per-device configuration information.  Put a
OncePer object inside Config and DeviceConfig, which computes a value
once per key per object to allow build logic to store arbitrary
per-build or per-device computed values.

Change-Id: I1a38b426f29d223ef5e803e0d4d9604500de2fd2
This commit is contained in:
Colin Cross
2016-08-17 15:24:12 -07:00
parent 389d2bb145
commit 9272ade7a8
5 changed files with 123 additions and 12 deletions

View File

@@ -717,7 +717,7 @@ func forEachInterface(v reflect.Value, f func(reflect.Value)) {
}
// Convert the arch product variables into a list of targets for each os class structs
func decodeTargetProductVariables(config Config) (map[OsClass][]Target, error) {
func decodeTargetProductVariables(config *config) (map[OsClass][]Target, error) {
variables := config.ProductVariables
targets := make(map[OsClass][]Target)