Commit graph

6 commits

Author SHA1 Message Date
Liz Kammer
be46fccc40 Use one mutator for all bp2build conversion.
Each conversion required defining a separate mutator, which will each
operate on _all_ modules and requires each to repeat checks whether the
mutator should operator. Instead, we introduce a single mutator and
modules can define a ConvertWithBp2build to implement bp2build
conversion for that module.

Test: bp2build.sh
Bug: 183079158
Change-Id: I99d4b51f441c2903879092c5b56313d606d4338d
2021-12-14 09:37:45 -05:00
Liz Kammer
1263d9bdb1 Handle includes for generated headers
For generated headers, Soong introduces the package to the includes (and
re-exports as necessary).

Test: bp2build.sh
Change-Id: Iea9cda859ddaa3e5393f0f4533c15fc60222c408
2021-12-13 12:06:39 -05:00
Liz Kammer
12615dbbca bp2build: support full/lite protos in cc libs
Test: bp2build.sh
Bug: 200601772
Change-Id: I3a7e00546726bc63b5eb8d5604557c5988a5320b
2021-12-02 11:00:46 -05:00
Liz Kammer
78cfdaa597 Refactor bp2build tests
Moves to specifying attributes as a map, such at it is possible to add
additional attributes conditionally. This is in particular useful once
supporting the `enabled` property which will add
`target_compatible_with`

Test: go test soong tests
Change-Id: Iade8eed1ce3acb1d1712a9ee3119d9ae59675624
2021-11-15 11:09:05 -05:00
Liz Kammer
e6583482a8 bp2build: Handle export_generated_header property
The generated_header property resides in BaseCompilerProperties, while
export_generated_header resides in BaseLinkerProperties. Previously
bp2build handled these property structs separately; however, these two
related properties residing in separate structs requires restructuring
the code to allow access to both BaseCompilerProperties and
BaseLinkerProperties for a single axis/configuration combination to
resolve which generated headers are exported/not for the
axis/configuration..

Test: go test soong tests
Test: build/bazel/ci/bp2build.sh
Change-Id: Id150003637fd19d87e8dc5d6941e9f36dc4031dd
2021-10-26 15:10:41 -04:00
Liz Kammer
2b8004b1ef bp2build: Add support for cc_binary.
Bug: 197920036
Test: build/bazel/ci/bp2build.sh
Change-Id: I2c4200967653af15a330ab8cbaf796b70d43f32d
2021-10-19 14:12:39 -04:00