Support arch variations for export_system_include_dirs in cc_library_headers bp2build converter.

Test: Added unit test
Test: bp2build-sync.py write; bazel build //bionic/... works for more cc_library_static targets (in a parent CL)
Change-Id: Ib487216a4bcbc52958ff948722dae347b0d8b606
This commit is contained in:
Rupert Shuttleworth
2021-04-06 20:06:21 +00:00
parent 85822e9b5f
commit b815168474
6 changed files with 268 additions and 36 deletions

View File

@@ -64,7 +64,7 @@ func prebuiltLibraryHeaderFactory() android.Module {
type bazelCcLibraryHeadersAttributes struct {
Copts bazel.StringListAttribute
Hdrs bazel.LabelListAttribute
Includes bazel.LabelListAttribute
Includes bazel.StringListAttribute
Deps bazel.LabelListAttribute
}
@@ -95,15 +95,15 @@ func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
return
}
exportedIncludesLabels, exportedIncludesHeadersLabels := bp2BuildParseExportedIncludes(ctx, module)
exportedIncludes, exportedIncludesHeaders := bp2BuildParseExportedIncludes(ctx, module)
headerLibsLabels := bp2BuildParseHeaderLibs(ctx, module)
headerLibs := bp2BuildParseHeaderLibs(ctx, module)
attrs := &bazelCcLibraryHeadersAttributes{
Copts: bp2BuildParseCflags(ctx, module),
Includes: exportedIncludesLabels,
Hdrs: exportedIncludesHeadersLabels,
Deps: headerLibsLabels,
Includes: exportedIncludes,
Hdrs: exportedIncludesHeaders,
Deps: headerLibs,
}
props := bazel.BazelTargetModuleProperties{