Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 1 | // These targets are appended to the autogenerated Android.bp by tools/gen_android_bp. |
Primiano Tucci | f955198 | 2019-09-06 13:48:01 +0100 | [diff] [blame] | 2 | |
Lalit Maganti | a88807d | 2018-03-05 18:21:38 +0000 | [diff] [blame] | 3 | cc_library_static { |
Lalit Maganti | a88807d | 2018-03-05 18:21:38 +0000 | [diff] [blame] | 4 | name: "perfetto_cts_jni_deps", |
Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 5 | srcs: [ |
Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 6 | "src/base/test/test_task_runner.cc", |
| 7 | "test/fake_producer.cc", |
Primiano Tucci | 008cdb9 | 2019-07-19 19:52:41 +0100 | [diff] [blame] | 8 | "test/task_runner_thread_delegates.cc", |
Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 9 | ], |
| 10 | shared_libs: [ |
Lalit Maganti | a88807d | 2018-03-05 18:21:38 +0000 | [diff] [blame] | 11 | "libprotobuf-cpp-lite", |
Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 12 | ], |
Lalit Maganti | a88807d | 2018-03-05 18:21:38 +0000 | [diff] [blame] | 13 | static_libs: [ |
Lalit Maganti | 6168188 | 2018-03-14 15:29:01 +0000 | [diff] [blame] | 14 | "libgtest", |
Primiano Tucci | f955198 | 2019-09-06 13:48:01 +0100 | [diff] [blame] | 15 | "libperfetto_client_experimental", |
Lalit Maganti | a88807d | 2018-03-05 18:21:38 +0000 | [diff] [blame] | 16 | ], |
Primiano Tucci | 8e62744 | 2019-08-28 07:58:38 +0200 | [diff] [blame] | 17 | defaults: [ |
| 18 | "perfetto_defaults", |
Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 19 | ], |
| 20 | } |
Lalit Maganti | 6820cb6 | 2018-10-05 13:34:22 +0100 | [diff] [blame] | 21 | |
Lalit Maganti | f5d666d | 2018-10-23 14:23:24 +0100 | [diff] [blame] | 22 | java_library_host { |
| 23 | name: "perfetto_config-full", |
Lalit Maganti | 6820cb6 | 2018-10-05 13:34:22 +0100 | [diff] [blame] | 24 | proto: { |
Lalit Maganti | f5d666d | 2018-10-23 14:23:24 +0100 | [diff] [blame] | 25 | type: "full", |
Lalit Maganti | 6820cb6 | 2018-10-05 13:34:22 +0100 | [diff] [blame] | 26 | }, |
| 27 | srcs: [ |
| 28 | "protos/perfetto/config/perfetto_config.proto", |
| 29 | ], |
| 30 | } |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 31 | |
Lalit Maganti | aa035b2 | 2019-12-20 16:13:09 +0000 | [diff] [blame] | 32 | java_library_host { |
| 33 | name: "perfetto_metrics-full", |
| 34 | proto: { |
| 35 | type: "full", |
| 36 | }, |
| 37 | srcs: [ |
| 38 | "protos/perfetto/metrics/perfetto_merged_metrics.proto", |
| 39 | ], |
| 40 | } |
| 41 | |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 42 | // This sample target shows how to use the perfetto client API from within the |
| 43 | // Android tree. |
| 44 | cc_binary { |
| 45 | name: "libperfetto_client_example", |
| 46 | srcs: [ |
Primiano Tucci | dd5ebc9 | 2019-07-25 01:09:37 +0100 | [diff] [blame] | 47 | "test/client_api_example.cc", |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 48 | ], |
| 49 | static_libs: [ |
| 50 | "libperfetto_client_experimental", |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 51 | "perfetto_trace_protos", |
| 52 | ], |
| 53 | shared_libs: [ |
| 54 | "libprotobuf-cpp-lite", |
| 55 | "liblog", |
| 56 | ], |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 57 | cflags: [ |
| 58 | "-DGOOGLE_PROTOBUF_NO_RTTI", |
| 59 | "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", |
Primiano Tucci | 8e62744 | 2019-08-28 07:58:38 +0200 | [diff] [blame] | 60 | ], |
| 61 | defaults: [ |
| 62 | "perfetto_defaults", |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 63 | ], |
| 64 | } |
Hector Dearman | 92d7d11 | 2019-12-05 15:19:57 +0000 | [diff] [blame] | 65 | |
| 66 | cc_library_static { |
| 67 | name: "libstatslog_perfetto", |
| 68 | generated_sources: ["statslog_perfetto.cpp"], |
| 69 | generated_headers: ["statslog_perfetto.h"], |
| 70 | cflags: [ |
| 71 | "-Wall", |
| 72 | "-Werror", |
| 73 | ], |
| 74 | export_generated_headers: ["statslog_perfetto.h"], |
| 75 | shared_libs: [ |
| 76 | "libcutils", |
| 77 | "liblog", |
| 78 | "libstatssocket", |
| 79 | "libutils", |
| 80 | ], |
| 81 | } |
| 82 | |
| 83 | genrule { |
| 84 | name: "statslog_perfetto.h", |
| 85 | tools: ["stats-log-api-gen"], |
| 86 | cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_perfetto.h --module perfetto --namespace perfetto,android_internal", |
| 87 | out: [ |
| 88 | "statslog_perfetto.h", |
| 89 | ], |
| 90 | } |
| 91 | |
| 92 | genrule { |
| 93 | name: "statslog_perfetto.cpp", |
| 94 | tools: ["stats-log-api-gen"], |
| 95 | cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_perfetto.cpp --module perfetto --namespace perfetto,android_internal --importHeader statslog_perfetto.h", |
| 96 | out: [ |
| 97 | "statslog_perfetto.cpp", |
| 98 | ], |
| 99 | } |