Add apex_available aidl + aidl&lang libraries
Test: b build com.android.neuralnetworks com.android.media.swcodec
Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9
diff --git a/cc/bp2build.go b/cc/bp2build.go
index 6951fc3..ba6dae3 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -907,6 +907,9 @@
return false
})
+ apexAvailableTags := android.ApexAvailableTags(ctx.Module())
+ sdkAttrs := bp2BuildParseSdkAttributes(m)
+
if !aidlSrcs.IsEmpty() {
aidlLibName := m.Name() + "_aidl_library"
ctx.CreateBazelTargetModule(
@@ -917,6 +920,7 @@
android.CommonAttributes{Name: aidlLibName},
&aidlLibraryAttributes{
Srcs: aidlSrcs,
+ Tags: apexAvailableTags,
},
)
aidlLibs.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + aidlLibName}})
@@ -941,6 +945,8 @@
Deps: aidlLibs,
Implementation_deps: *implementationDeps,
Implementation_dynamic_deps: *implementationDynamicDeps,
+ Tags: apexAvailableTags,
+ sdkAttributes: sdkAttrs,
},
)
label := &bazel.LabelAttribute{
diff --git a/cc/library.go b/cc/library.go
index 31b76cd..a9ada97 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -264,12 +264,15 @@
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 {