diff options
author | Colin Cross <ccross@android.com> | 2019-04-11 14:07:04 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-04-12 14:55:16 +0000 |
commit | 91268c668ce952baee0d5ddb922b7b4c8ddd5b1d (patch) | |
tree | 505a9f003f57ca3736eaa713db77a06d587ee6f0 /java/dexpreopt_bootjars.go | |
parent | 8235220a824cfda74da374db74298c627be9c489 (diff) | |
download | build_soong-91268c668ce952baee0d5ddb922b7b4c8ddd5b1d.tar.gz build_soong-91268c668ce952baee0d5ddb922b7b4c8ddd5b1d.tar.bz2 build_soong-91268c668ce952baee0d5ddb922b7b4c8ddd5b1d.zip |
Make makevars deterministic
Sort map keys before iterating over them to produce makevars.
Bug: 130411407
Test: m checkbuild
Change-Id: I4153977705da05a5c73e641f93d02f408209c897
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r-- | java/dexpreopt_bootjars.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index e857fe81..cb2ea9f0 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -469,7 +469,14 @@ func (d *dexpreoptBootJars) MakeVars(ctx android.MakeVarsContext) { var imageNames []string for _, current := range append(d.otherImages, image) { imageNames = append(imageNames, current.name) + var arches []android.ArchType for arch, _ := range current.images { + arches = append(arches, arch) + } + + sort.Slice(arches, func(i, j int) bool { return arches[i].String() < arches[j].String() }) + + for _, arch := range arches { ctx.Strict("DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_"+current.name+"_"+arch.String(), current.vdexInstalls[arch].String()) ctx.Strict("DEXPREOPT_IMAGE_"+current.name+"_"+arch.String(), current.images[arch].String()) ctx.Strict("DEXPREOPT_IMAGE_BUILT_INSTALLED_"+current.name+"_"+arch.String(), current.installs[arch].String()) |