blob: b414a347d2acb43a49dd03ac3f1e0b22ae1b0eb8 [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 Magantif5d666d2018-10-23 14:23:24 +01003java_library_host {
4 name: "perfetto_config-full",
Lalit Maganti6820cb62018-10-05 13:34:22 +01005 proto: {
Lalit Magantif5d666d2018-10-23 14:23:24 +01006 type: "full",
Lalit Maganti6820cb62018-10-05 13:34:22 +01007 },
8 srcs: [
9 "protos/perfetto/config/perfetto_config.proto",
10 ],
11}
Primiano Tucci0b651b82019-06-03 17:16:23 +010012
Lalit Magantiaa035b22019-12-20 16:13:09 +000013java_library_host {
14 name: "perfetto_metrics-full",
15 proto: {
16 type: "full",
17 },
18 srcs: [
19 "protos/perfetto/metrics/perfetto_merged_metrics.proto",
20 ],
21}
22
Primiano Tucci0b651b82019-06-03 17:16:23 +010023// This sample target shows how to use the perfetto client API from within the
24// Android tree.
25cc_binary {
26 name: "libperfetto_client_example",
27 srcs: [
Primiano Tuccidd5ebc92019-07-25 01:09:37 +010028 "test/client_api_example.cc",
Primiano Tucci0b651b82019-06-03 17:16:23 +010029 ],
30 static_libs: [
31 "libperfetto_client_experimental",
Primiano Tucci0b651b82019-06-03 17:16:23 +010032 "perfetto_trace_protos",
33 ],
34 shared_libs: [
35 "libprotobuf-cpp-lite",
36 "liblog",
37 ],
Primiano Tucci0b651b82019-06-03 17:16:23 +010038 cflags: [
39 "-DGOOGLE_PROTOBUF_NO_RTTI",
40 "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
Primiano Tucci8e627442019-08-28 07:58:38 +020041 ],
42 defaults: [
43 "perfetto_defaults",
Primiano Tucci0b651b82019-06-03 17:16:23 +010044 ],
45}
Hector Dearman92d7d112019-12-05 15:19:57 +000046
47cc_library_static {
48 name: "libstatslog_perfetto",
49 generated_sources: ["statslog_perfetto.cpp"],
50 generated_headers: ["statslog_perfetto.h"],
51 cflags: [
52 "-Wall",
53 "-Werror",
54 ],
55 export_generated_headers: ["statslog_perfetto.h"],
56 shared_libs: [
57 "libcutils",
58 "liblog",
59 "libstatssocket",
60 "libutils",
61 ],
62}
63
64genrule {
65 name: "statslog_perfetto.h",
66 tools: ["stats-log-api-gen"],
67 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_perfetto.h --module perfetto --namespace perfetto,android_internal",
68 out: [
69 "statslog_perfetto.h",
70 ],
71}
72
73genrule {
74 name: "statslog_perfetto.cpp",
75 tools: ["stats-log-api-gen"],
76 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_perfetto.cpp --module perfetto --namespace perfetto,android_internal --importHeader statslog_perfetto.h",
77 out: [
78 "statslog_perfetto.cpp",
79 ],
80}
Florian Mayer1584c262021-03-05 13:11:22 +000081
82package {
83 default_applicable_licenses: ["external_perfetto_license"],
84}
85
86// Added automatically by a large-scale-change that took the approach of
87// 'apply every license found to every target'. While this makes sure we respect
88// every license restriction, it may not be entirely correct.
89//
90// e.g. GPL in an MIT project might only apply to the contrib/ directory.
91//
92// Please consider splitting the single license below into multiple licenses,
93// taking care not to lose any license_kind information, and overriding the
94// default license using the 'licenses: [...]' property on targets as needed.
95//
96// For unused files, consider creating a 'fileGroup' with "//visibility:private"
97// to attach the license to, and including a comment whether the files may be
98// used in the current project.
99// See: http://go/android-license-faq
100license {
101 name: "external_perfetto_license",
102 visibility: [":__subpackages__"],
103 license_kinds: [
104 "SPDX-license-identifier-Apache-2.0",
105 "SPDX-license-identifier-BSD",
106 "SPDX-license-identifier-CC-BY",
107 ],
108 license_text: [
109 "LICENSE",
110 ],
111}