Convert apex_available (for supported modules) to bazel tags.
The tags will then be read by an aspect applied from apex attributes to validate that the deps are explicitly opt-in to the appropriate apex. The semantics of this is the same as the Soong apex_available property. This also adds the "base_apex_name" attr to override_apex conversion so that apex_available checks continue to work on the non-Google and non-Go apex names. Test: presubmits Fixes: 218841706 Change-Id: I19b3637da9aa47573b252d74f62b601fbdc3784d
This commit is contained in:
@@ -655,11 +655,12 @@ func binaryBp2build(ctx android.TopDownMutatorContext, m *Module) {
|
||||
// shared with cc_test
|
||||
binaryAttrs := binaryBp2buildAttrs(ctx, m)
|
||||
|
||||
tags := android.ApexAvailableTags(m)
|
||||
ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{
|
||||
Rule_class: "cc_binary",
|
||||
Bzl_load_location: "//build/bazel/rules/cc:cc_binary.bzl",
|
||||
},
|
||||
android.CommonAttributes{Name: m.Name()},
|
||||
android.CommonAttributes{Name: m.Name(), Tags: tags},
|
||||
&binaryAttrs)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user