Getting rid of old hacky Libs conversion

Now that libs conversion is happening for the needed module_types,
removing if statement with old hacky libs conversion

Test: Presubmit
Bug: 244210934
Change-Id: I92bb2080eeb7dcb85d087a3ff6054bdf8675ec54
This commit is contained in:
Alix
2023-01-19 15:30:38 +00:00
parent fbd7fabf0a
commit 684f63ab5a

View File

@@ -2675,17 +2675,10 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
}
if m.properties.Libs != nil {
// TODO 244210934 ALIX Check if this else statement breaks presubmits get rid of it if it doesn't
modType := ctx.ModuleType()
if strings.HasPrefix(modType, "java_binary") || strings.HasPrefix(modType, "java_library") || modType == "android_app" || modType == "android_library" || modType == "java_plugin" {
for _, d := range m.properties.Libs {
neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"
deps.Add(&neverlinkLabel)
}
} else {
deps.Append(android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(android.CopyOf(m.properties.Libs))))
for _, d := range m.properties.Libs {
neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"
deps.Add(&neverlinkLabel)
}
}