Add bp2build support for cc_library_static.

Also refactor bp2build-related code for cc_library_headers.

(Retry of previous CL after the presubmit failed to detect a merge conflict)

Test: Added unit test.

Test: bp2build-sync.py write; bazel build //bionic/... still works (but bp2build is disabled for most cc_library_static targets for other reasons)
Change-Id: I2f4405c2fea305623bbc6daaaf62808b0c074216
This commit is contained in:
Rupert Shuttleworth
2021-03-25 09:06:03 +00:00
parent 6400f20430
commit 095081c6d7
6 changed files with 453 additions and 27 deletions

View File

@@ -123,7 +123,8 @@ cc_library_headers {
name: "foo_headers",
export_include_dirs: ["dir-1", "dir-2"],
header_libs: ["lib-1", "lib-2"],
export_header_lib_headers: ["lib-1", "lib-2"],
// TODO: Also support export_header_lib_headers
bazel_module: { bp2build_available: true },
}`,
expectedBazelTargets: []string{`cc_library_headers(