diff options
author | Andreas Gampe <agampe@google.com> | 2018-03-29 10:03:13 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2018-03-29 20:53:02 -0700 |
commit | f03e021c07fcd00618baa140b5d4023088d2e9ea (patch) | |
tree | b13346c410c4de413f6fc91fe35421d213f9d7e9 | |
parent | 24e71cd0073f94a9a0c3006539ec1fd70e7a1016 (diff) | |
download | extras-f03e021c07fcd00618baa140b5d4023088d2e9ea.tar.gz |
Perfprofd: Move proto to its own static library
In order to break dependency cycles, move the record proto to its
own library.
(cherry picked from commit a145b35d4780b4f81a8355bb3fe58a79af8a06f0)
Bug: 73175642
Test: mmma system/extras/perfprofd
Merged-In: I0931a59c82d92e2c9c2e702dbc89f76cd9804919
Change-Id: I0931a59c82d92e2c9c2e702dbc89f76cd9804919
-rw-r--r-- | perfprofd/Android.bp | 43 | ||||
-rw-r--r-- | perfprofd/dropbox/Android.bp | 2 |
2 files changed, 37 insertions, 8 deletions
diff --git a/perfprofd/Android.bp b/perfprofd/Android.bp index 04c10b19..7cecbe92 100644 --- a/perfprofd/Android.bp +++ b/perfprofd/Android.bp @@ -51,6 +51,41 @@ cc_defaults { ], } +// Static library for the record proto and its I/O. + +cc_library_static { + name: "libperfprofd_record_proto", + defaults: [ + "perfprofd_defaults", + ], + host_supported: true, + target: { + darwin: { + enabled: false, + }, + }, + + static_libs: [ + "libbase", + "libprotobuf-cpp-lite", + "libquipper", + "libz", + ], + srcs: [ + "perfprofd_io.cc", + "perfprofd_record.proto", + ], + + proto: { + export_proto_headers: true, + include_dirs: ["external/perf_data_converter/src/quipper"], + type: "lite", + }, + + export_include_dirs: ["."], // Really only the -fwd.h. + export_static_lib_headers: ["libquipper"], +} + // // Static library containing guts of AWP daemon. // @@ -72,24 +107,18 @@ cc_defaults { "libsimpleperf_elf_read", ], whole_static_libs: [ + "libperfprofd_record_proto", "libquipper", ], srcs: [ - "perfprofd_record.proto", "perf_data_converter.cc", "configreader.cc", "cpuconfig.cc", "perfprofdcore.cc", "perfprofd_cmdline.cc", - "perfprofd_io.cc", "symbolizer.cc" ], - proto: { - export_proto_headers: true, - include_dirs: ["external/perf_data_converter/src/quipper"], - type: "lite", - }, cflags: [ "-Wno-gnu-anonymous-struct", ], diff --git a/perfprofd/dropbox/Android.bp b/perfprofd/dropbox/Android.bp index 72c749b2..c3b8f3b8 100644 --- a/perfprofd/dropbox/Android.bp +++ b/perfprofd/dropbox/Android.bp @@ -27,7 +27,7 @@ cc_library_static { export_include_dirs: ["."], static_libs: [ "libbase", - "libperfprofdcore", + "libperfprofd_record_proto", "libprotobuf-cpp-lite", ], target: { |