blob: 95865161b06b99091818e04b3a37177bff7f5af9 [file] [log] [blame]
Lalit Maganti83e712a2018-02-05 15:48:00 +00001// These targets are appended to the autogenerated Android.bp by tools/gen_android_bp.
Primiano Tuccif9551982019-09-06 13:48:01 +01002
Lalit Magantia88807d2018-03-05 18:21:38 +00003cc_library_static {
Lalit Magantia88807d2018-03-05 18:21:38 +00004 name: "perfetto_cts_jni_deps",
Lalit Maganti83e712a2018-02-05 15:48:00 +00005 srcs: [
Lalit Maganti83e712a2018-02-05 15:48:00 +00006 "src/base/test/test_task_runner.cc",
7 "test/fake_producer.cc",
Primiano Tucci008cdb92019-07-19 19:52:41 +01008 "test/task_runner_thread_delegates.cc",
Lalit Maganti83e712a2018-02-05 15:48:00 +00009 ],
10 shared_libs: [
Lalit Magantia88807d2018-03-05 18:21:38 +000011 "libprotobuf-cpp-lite",
Lalit Maganti83e712a2018-02-05 15:48:00 +000012 ],
Lalit Magantia88807d2018-03-05 18:21:38 +000013 static_libs: [
Lalit Maganti61681882018-03-14 15:29:01 +000014 "libgtest",
Primiano Tuccif9551982019-09-06 13:48:01 +010015 "libperfetto_client_experimental",
Lalit Magantia88807d2018-03-05 18:21:38 +000016 ],
Primiano Tucci8e627442019-08-28 07:58:38 +020017 defaults: [
18 "perfetto_defaults",
Lalit Maganti83e712a2018-02-05 15:48:00 +000019 ],
20}
Lalit Maganti6820cb62018-10-05 13:34:22 +010021
Lalit Magantif5d666d2018-10-23 14:23:24 +010022java_library_host {
23 name: "perfetto_config-full",
Lalit Maganti6820cb62018-10-05 13:34:22 +010024 proto: {
Lalit Magantif5d666d2018-10-23 14:23:24 +010025 type: "full",
Lalit Maganti6820cb62018-10-05 13:34:22 +010026 },
27 srcs: [
28 "protos/perfetto/config/perfetto_config.proto",
29 ],
30}
Primiano Tucci0b651b82019-06-03 17:16:23 +010031
Lalit Magantiaa035b22019-12-20 16:13:09 +000032java_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 Tucci0b651b82019-06-03 17:16:23 +010042// This sample target shows how to use the perfetto client API from within the
43// Android tree.
44cc_binary {
45 name: "libperfetto_client_example",
46 srcs: [
Primiano Tuccidd5ebc92019-07-25 01:09:37 +010047 "test/client_api_example.cc",
Primiano Tucci0b651b82019-06-03 17:16:23 +010048 ],
49 static_libs: [
50 "libperfetto_client_experimental",
Primiano Tucci0b651b82019-06-03 17:16:23 +010051 "perfetto_trace_protos",
52 ],
53 shared_libs: [
54 "libprotobuf-cpp-lite",
55 "liblog",
56 ],
Primiano Tucci0b651b82019-06-03 17:16:23 +010057 cflags: [
58 "-DGOOGLE_PROTOBUF_NO_RTTI",
59 "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
Primiano Tucci8e627442019-08-28 07:58:38 +020060 ],
61 defaults: [
62 "perfetto_defaults",
Primiano Tucci0b651b82019-06-03 17:16:23 +010063 ],
64}
Hector Dearman92d7d112019-12-05 15:19:57 +000065
66cc_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
83genrule {
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
92genrule {
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}