Merge "Revert "Produce _alwayslink sibling targets through bp2build""

This commit is contained in:
Treehugger Robot
2023-03-07 07:33:16 +00:00
committed by Gerrit Code Review
3 changed files with 4 additions and 44 deletions

View File

@@ -352,7 +352,6 @@ type bazelPrebuiltLibraryStaticAttributes struct {
Static_library bazel.LabelAttribute
Export_includes bazel.StringListAttribute
Export_system_includes bazel.StringListAttribute
Alwayslink bazel.BoolAttribute
}
// TODO(b/228623543): The below is not entirely true until the bug is fixed. For now, both targets are always generated
@@ -390,11 +389,6 @@ func prebuiltLibraryStaticBp2Build(ctx android.TopDownMutatorContext, module *Mo
tags := android.ApexAvailableTags(module)
ctx.CreateBazelTargetModuleWithRestrictions(props, android.CommonAttributes{Name: name, Tags: tags}, attrs, prebuiltAttrs.Enabled)
_true := true
alwayslinkAttrs := *attrs
alwayslinkAttrs.Alwayslink.SetValue(&_true)
ctx.CreateBazelTargetModuleWithRestrictions(props, android.CommonAttributes{Name: name + "_alwayslink", Tags: tags}, &alwayslinkAttrs, prebuiltAttrs.Enabled)
}
type bazelPrebuiltLibrarySharedAttributes struct {