Add apex_available aidl + aidl&lang libraries
Test: b build com.android.neuralnetworks com.android.media.swcodec Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9
This commit is contained in:
@@ -2625,10 +2625,12 @@ type eventLogTagsAttributes struct {
|
||||
|
||||
type aidlLibraryAttributes struct {
|
||||
Srcs bazel.LabelListAttribute
|
||||
Tags bazel.StringListAttribute
|
||||
}
|
||||
|
||||
type javaAidlLibraryAttributes struct {
|
||||
Deps bazel.LabelListAttribute
|
||||
Tags bazel.StringListAttribute
|
||||
}
|
||||
|
||||
// bp2BuildJavaInfo has information needed for the conversion of java*_modules
|
||||
@@ -2700,6 +2702,8 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
return android.IsConvertedToAidlLibrary(ctx, src.OriginalModuleName)
|
||||
})
|
||||
|
||||
apexAvailableTags := android.ApexAvailableTags(ctx.Module())
|
||||
|
||||
if !aidlSrcs.IsEmpty() {
|
||||
aidlLibName := m.Name() + "_aidl_library"
|
||||
ctx.CreateBazelTargetModule(
|
||||
@@ -2710,6 +2714,7 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
android.CommonAttributes{Name: aidlLibName},
|
||||
&aidlLibraryAttributes{
|
||||
Srcs: aidlSrcs,
|
||||
Tags: apexAvailableTags,
|
||||
},
|
||||
)
|
||||
aidlLibs.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + aidlLibName}})
|
||||
@@ -2724,6 +2729,7 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
android.CommonAttributes{Name: javaAidlLibName},
|
||||
&javaAidlLibraryAttributes{
|
||||
Deps: aidlLibs,
|
||||
Tags: apexAvailableTags,
|
||||
},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user