Merge changes from topic "sysprop-apex-available" am: 58c9b0678a am: 46441d76bc

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2506495

Change-Id: Ie093fdc10827ce43679ee9bc1c13bad8c3022cf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-03-24 23:33:53 +00:00
committed by Automerger Merge Worker

View File

@@ -22,11 +22,13 @@ import (
// TODO(b/240463568): Additional properties will be added for API validation // TODO(b/240463568): Additional properties will be added for API validation
type bazelSyspropLibraryAttributes struct { type bazelSyspropLibraryAttributes struct {
Srcs bazel.LabelListAttribute Srcs bazel.LabelListAttribute
Tags bazel.StringListAttribute
} }
type bazelCcSyspropLibraryAttributes struct { type bazelCcSyspropLibraryAttributes struct {
Dep bazel.LabelAttribute Dep bazel.LabelAttribute
Min_sdk_version *string Min_sdk_version *string
Tags bazel.StringListAttribute
} }
type SyspropLibraryLabels struct { type SyspropLibraryLabels struct {
@@ -36,6 +38,7 @@ type SyspropLibraryLabels struct {
} }
func Bp2buildSysprop(ctx android.Bp2buildMutatorContext, labels SyspropLibraryLabels, srcs bazel.LabelListAttribute, minSdkVersion *string) { func Bp2buildSysprop(ctx android.Bp2buildMutatorContext, labels SyspropLibraryLabels, srcs bazel.LabelListAttribute, minSdkVersion *string) {
apexAvailableTags := android.ApexAvailableTags(ctx.Module())
ctx.CreateBazelTargetModule( ctx.CreateBazelTargetModule(
bazel.BazelTargetModuleProperties{ bazel.BazelTargetModuleProperties{
Rule_class: "sysprop_library", Rule_class: "sysprop_library",
@@ -44,11 +47,14 @@ func Bp2buildSysprop(ctx android.Bp2buildMutatorContext, labels SyspropLibraryLa
android.CommonAttributes{Name: labels.SyspropLibraryLabel}, android.CommonAttributes{Name: labels.SyspropLibraryLabel},
&bazelSyspropLibraryAttributes{ &bazelSyspropLibraryAttributes{
Srcs: srcs, Srcs: srcs,
}) Tags: apexAvailableTags,
},
)
attrs := &bazelCcSyspropLibraryAttributes{ attrs := &bazelCcSyspropLibraryAttributes{
Dep: *bazel.MakeLabelAttribute(":" + labels.SyspropLibraryLabel), Dep: *bazel.MakeLabelAttribute(":" + labels.SyspropLibraryLabel),
Min_sdk_version: minSdkVersion, Min_sdk_version: minSdkVersion,
Tags: apexAvailableTags,
} }
if labels.SharedLibraryLabel != "" { if labels.SharedLibraryLabel != "" {