Add target/os configurable string_list attrs.

Starting with copts for cc_object, with an extracted function that can
be shared with other cc_* module types.

Test: TH
Change-Id: I9025232e83a3dcd0ca243387486fafbdbd3e2d9b
This commit is contained in:
Jingwen Chen
2021-04-05 10:35:13 +00:00
parent 1a6bbbd990
commit c1c2650532
7 changed files with 209 additions and 71 deletions

View File

@@ -62,6 +62,7 @@ func prebuiltLibraryHeaderFactory() android.Module {
}
type bazelCcLibraryHeadersAttributes struct {
Copts bazel.StringListAttribute
Hdrs bazel.LabelListAttribute
Includes bazel.LabelListAttribute
Deps bazel.LabelListAttribute
@@ -99,6 +100,7 @@ func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
headerLibsLabels := bp2BuildParseHeaderLibs(ctx, module)
attrs := &bazelCcLibraryHeadersAttributes{
Copts: bp2BuildParseCflags(ctx, module),
Includes: exportedIncludesLabels,
Hdrs: exportedIncludesHeadersLabels,
Deps: headerLibsLabels,