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:
Liz Kammer
2023-03-23 11:51:49 -04:00
parent 10e5a0e987
commit 2b3f56ed22
8 changed files with 55 additions and 14 deletions

View File

@@ -907,6 +907,9 @@ func bp2buildCcAidlLibrary(
return false
})
apexAvailableTags := android.ApexAvailableTags(ctx.Module())
sdkAttrs := bp2BuildParseSdkAttributes(m)
if !aidlSrcs.IsEmpty() {
aidlLibName := m.Name() + "_aidl_library"
ctx.CreateBazelTargetModule(
@@ -917,6 +920,7 @@ func bp2buildCcAidlLibrary(
android.CommonAttributes{Name: aidlLibName},
&aidlLibraryAttributes{
Srcs: aidlSrcs,
Tags: apexAvailableTags,
},
)
aidlLibs.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + aidlLibName}})
@@ -941,6 +945,8 @@ func bp2buildCcAidlLibrary(
Deps: aidlLibs,
Implementation_deps: *implementationDeps,
Implementation_dynamic_deps: *implementationDynamicDeps,
Tags: apexAvailableTags,
sdkAttributes: sdkAttrs,
},
)
label := &bazel.LabelAttribute{

View File

@@ -264,12 +264,15 @@ type bazelCcLibraryAttributes struct {
type aidlLibraryAttributes struct {
Srcs bazel.LabelListAttribute
Include_dir *string
Tags bazel.StringListAttribute
}
type ccAidlLibraryAttributes struct {
Deps bazel.LabelListAttribute
Implementation_deps bazel.LabelListAttribute
Implementation_dynamic_deps bazel.LabelListAttribute
Tags bazel.StringListAttribute
sdkAttributes
}
type stripAttributes struct {