From 4d4edfb8d801d127cc7a116935f982d3ecdc489f Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Mon, 5 Feb 2024 19:27:06 +0000 Subject: [PATCH] Sort the inputs to mergedAconfigFilesRule The aconfig files are collected by visiting the direct deps of the module. VisitDirectDeps does not guarantee ordered traversal. To prevent non-determinism in the generated ninja file, sort the inputs. Test: go build ./android Change-Id: Ic67fc0859bf18de62b6297ed502d1d495cc3a780 --- android/aconfig_providers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/aconfig_providers.go b/android/aconfig_providers.go index be9beb1ba..1444e7d8f 100644 --- a/android/aconfig_providers.go +++ b/android/aconfig_providers.go @@ -171,7 +171,7 @@ func aconfigUpdateAndroidMkEntries(ctx fillInEntriesContext, mod Module, entries } func mergeAconfigFiles(ctx ModuleContext, container string, inputs Paths, generateRule bool) Paths { - inputs = LastUniquePaths(inputs) + inputs = SortedUniquePaths(inputs) if len(inputs) == 1 { return Paths{inputs[0]} }