blob: ec61a44e54f08e95133272ebdceb322f729a78df [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
32// This sample target shows how to use the perfetto client API from within the
33// Android tree.
34cc_binary {
35 name: "libperfetto_client_example",
36 srcs: [
Primiano Tuccidd5ebc92019-07-25 01:09:37 +010037 "test/client_api_example.cc",
Primiano Tucci0b651b82019-06-03 17:16:23 +010038 ],
39 static_libs: [
40 "libperfetto_client_experimental",
Primiano Tucci0b651b82019-06-03 17:16:23 +010041 "perfetto_trace_protos",
42 ],
43 shared_libs: [
44 "libprotobuf-cpp-lite",
45 "liblog",
46 ],
Primiano Tucci0b651b82019-06-03 17:16:23 +010047 cflags: [
48 "-DGOOGLE_PROTOBUF_NO_RTTI",
49 "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
Primiano Tucci8e627442019-08-28 07:58:38 +020050 ],
51 defaults: [
52 "perfetto_defaults",
Primiano Tucci0b651b82019-06-03 17:16:23 +010053 ],
54}
Hector Dearman92d7d112019-12-05 15:19:57 +000055
56cc_library_static {
57 name: "libstatslog_perfetto",
58 generated_sources: ["statslog_perfetto.cpp"],
59 generated_headers: ["statslog_perfetto.h"],
60 cflags: [
61 "-Wall",
62 "-Werror",
63 ],
64 export_generated_headers: ["statslog_perfetto.h"],
65 shared_libs: [
66 "libcutils",
67 "liblog",
68 "libstatssocket",
69 "libutils",
70 ],
71}
72
73genrule {
74 name: "statslog_perfetto.h",
75 tools: ["stats-log-api-gen"],
76 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_perfetto.h --module perfetto --namespace perfetto,android_internal",
77 out: [
78 "statslog_perfetto.h",
79 ],
80}
81
82genrule {
83 name: "statslog_perfetto.cpp",
84 tools: ["stats-log-api-gen"],
85 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_perfetto.cpp --module perfetto --namespace perfetto,android_internal --importHeader statslog_perfetto.h",
86 out: [
87 "statslog_perfetto.cpp",
88 ],
89}