Replace SortedStringKeys with SortedKeys
Now that we have generics. Bug: 193460475 Test: presubmits Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
This commit is contained in:
@@ -1263,7 +1263,7 @@ func (la *linkerAttributes) finalize(ctx android.BazelConversionPathContext) {
|
||||
// result in duplicate library errors for bionic OSes. Here, we explicitly exclude those libraries
|
||||
// from bionic OSes and the no config case as these libraries only build for bionic OSes.
|
||||
if la.systemDynamicDeps.IsNil() && len(la.usedSystemDynamicDepAsDynamicDep) > 0 {
|
||||
toRemove := bazelLabelForSharedDeps(ctx, android.SortedStringKeys(la.usedSystemDynamicDepAsDynamicDep))
|
||||
toRemove := bazelLabelForSharedDeps(ctx, android.SortedKeys(la.usedSystemDynamicDepAsDynamicDep))
|
||||
la.dynamicDeps.Exclude(bazel.NoConfigAxis, "", toRemove)
|
||||
la.dynamicDeps.Exclude(bazel.OsConfigurationAxis, "android", toRemove)
|
||||
la.dynamicDeps.Exclude(bazel.OsConfigurationAxis, "linux_bionic", toRemove)
|
||||
|
@@ -3930,7 +3930,7 @@ func assertArrayString(t *testing.T, got, expected []string) {
|
||||
|
||||
func assertMapKeys(t *testing.T, m map[string]string, expected []string) {
|
||||
t.Helper()
|
||||
assertArrayString(t, android.SortedStringKeys(m), expected)
|
||||
assertArrayString(t, android.SortedKeys(m), expected)
|
||||
}
|
||||
|
||||
func TestDefaults(t *testing.T) {
|
||||
|
@@ -405,7 +405,7 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b
|
||||
}
|
||||
|
||||
// Add the collated include dir properties to the output.
|
||||
for _, property := range android.SortedStringKeys(includeDirs) {
|
||||
for _, property := range android.SortedKeys(includeDirs) {
|
||||
outputProperties.AddProperty(property, includeDirs[property])
|
||||
}
|
||||
|
||||
|
@@ -1716,9 +1716,9 @@ func (s *sanitizerStaticLibsMap) add(c LinkableInterface, name string) {
|
||||
// These are to be used by use_soong_sanitized_static_libraries.
|
||||
// See build/make/core/binary.mk for more details.
|
||||
func (s *sanitizerStaticLibsMap) exportToMake(ctx android.MakeVarsContext) {
|
||||
for _, image := range android.SortedStringKeys(s.libsMap) {
|
||||
for _, image := range android.SortedKeys(s.libsMap) {
|
||||
archMap := s.libsMap[ImageVariantType(image)]
|
||||
for _, arch := range android.SortedStringKeys(archMap) {
|
||||
for _, arch := range android.SortedKeys(archMap) {
|
||||
libs := archMap[arch]
|
||||
sort.Strings(libs)
|
||||
|
||||
|
@@ -73,7 +73,7 @@ func stubLibrariesSingleton() android.Singleton {
|
||||
|
||||
func (s *stubLibraries) MakeVars(ctx android.MakeVarsContext) {
|
||||
// Convert stub library file names into Makefile variable.
|
||||
ctx.Strict("STUB_LIBRARIES", strings.Join(android.SortedStringKeys(s.stubLibraryMap), " "))
|
||||
ctx.Strict("STUB_LIBRARIES", strings.Join(android.SortedKeys(s.stubLibraryMap), " "))
|
||||
|
||||
// Export the list of API XML files to Make.
|
||||
sort.Strings(s.apiListCoverageXmlPaths)
|
||||
|
@@ -118,7 +118,7 @@ func combineNoticesRule(ctx android.SingletonContext, paths android.Paths, out s
|
||||
// ...
|
||||
func installMapListFileRule(ctx android.SingletonContext, m map[string]string, path string) android.OutputPath {
|
||||
var txtBuilder strings.Builder
|
||||
for idx, k := range android.SortedStringKeys(m) {
|
||||
for idx, k := range android.SortedKeys(m) {
|
||||
if idx > 0 {
|
||||
txtBuilder.WriteString("\n")
|
||||
}
|
||||
|
@@ -876,7 +876,7 @@ func (c *vndkSnapshotSingleton) MakeVars(ctx android.MakeVarsContext) {
|
||||
})
|
||||
|
||||
ctx.Strict("LLNDK_MOVED_TO_APEX_LIBRARIES",
|
||||
strings.Join(android.SortedStringKeys(movedToApexLlndkLibraries), " "))
|
||||
strings.Join(android.SortedKeys(movedToApexLlndkLibraries), " "))
|
||||
|
||||
ctx.Strict("VNDK_LIBRARIES_FILE", c.vndkLibrariesFile.String())
|
||||
ctx.Strict("SOONG_VNDK_SNAPSHOT_ZIP", c.vndkSnapshotZipFile.String())
|
||||
|
Reference in New Issue
Block a user