commit | f0d7ef8e4fe6941188679e55eea3b545d1b4cc56 | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Fri Oct 04 15:35:24 2019 +0100 |
committer | Primiano Tucci <primiano@google.com> | Fri Oct 04 15:35:24 2019 +0100 |
tree | 36938d5f8ec54b5f9bf80d4f10a3249ead41e3ff | |
parent | f77a4786a334c8fd83ece3177f00634ee7e019b5 [diff] |
gen_android_bp: use gn_utils This change uniforms the behavior of tools/gen_android_bp with the one of tools/gen_bazel. This is required to add a third generator (to get rid of checked-in proto->cpp files). Before this CL gen_android_bp was dealing, among the other things, with: 1. Recursively traversing the source_set targets to figure out the transitive closure of sources for each linker unit. This is because, like bazel, Android.bp does not have the concept of source_sets like GN. 2. Detecting proto targets and reverse engineering the plugin from the protoc cmdline invocation. gn_utils deals with these two responsibilities so there is no reason to keep the ad-hoc behavior in gen_android_bp. As a side effect, the generated Android.bp is a little bit easier to reason about. Now we generate one filegroup for each source set and add the transitive closure of file groups (NOT the transitive closure of source files) to each linker unit. Test: I manually inspected the diff of the generated Android.bp and it seems legit. Also builds and passes tests. Bug: 132880619 Bug: 115873049 Change-Id: If77a85aadbc4edecc8d7874cc14c1f427e1ec646
Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.
See www.perfetto.dev for docs.