Make generated library SDK snapshots determinstic
Sort the include dir properties before printing them out of a map.
Test: m checkbuild
Change-Id: Ia924158755983631259ef0b53c369666de4e1d23
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index 7187360..ecfdc99 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -291,8 +291,8 @@
}
// 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 {