From 2c033610e224e5a9455a89c18bdc09b1c12c5b7b Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 11 Sep 2020 15:44:31 -0700 Subject: [PATCH] Make generated library SDK snapshots determinstic Sort the include dir properties before printing them out of a map. Test: m checkbuild Change-Id: Ia924158755983631259ef0b53c369666de4e1d23 --- cc/library_sdk_member.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go index 718736069..ecfdc9977 100644 --- a/cc/library_sdk_member.go +++ b/cc/library_sdk_member.go @@ -291,8 +291,8 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b } // Add the collated include dir properties to the output. - for property, dirs := range includeDirs { - outputProperties.AddProperty(property, dirs) + for _, property := range android.SortedStringKeys(includeDirs) { + outputProperties.AddProperty(property, includeDirs[property]) } if len(libInfo.StubsVersion) > 0 {