xref: /aosp_15_r20/external/perfetto/bazel/open_csd.BUILD (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load("@perfetto_cfg//:perfetto_cfg.bzl", "PERFETTO_CONFIG")
16
17cc_library(
18    name = "open_csd",
19    srcs = [
20        "decoder/source/c_api/ocsd_c_api.cpp",
21        "decoder/source/c_api/ocsd_c_api_custom_obj.cpp",
22        "decoder/source/c_api/ocsd_c_api_custom_obj.h",
23        "decoder/source/c_api/ocsd_c_api_obj.h",
24        "decoder/source/ete/trc_cmp_cfg_ete.cpp",
25        "decoder/source/etmv3/trc_cmp_cfg_etmv3.cpp",
26        "decoder/source/etmv3/trc_pkt_decode_etmv3.cpp",
27        "decoder/source/etmv3/trc_pkt_elem_etmv3.cpp",
28        "decoder/source/etmv3/trc_pkt_proc_etmv3.cpp",
29        "decoder/source/etmv3/trc_pkt_proc_etmv3_impl.cpp",
30        "decoder/source/etmv3/trc_pkt_proc_etmv3_impl.h",
31        "decoder/source/etmv4/trc_cmp_cfg_etmv4.cpp",
32        "decoder/source/etmv4/trc_etmv4_stack_elem.cpp",
33        "decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp",
34        "decoder/source/etmv4/trc_pkt_elem_etmv4i.cpp",
35        "decoder/source/etmv4/trc_pkt_proc_etmv4i.cpp",
36        "decoder/source/i_dec/trc_i_decode.cpp",
37        "decoder/source/i_dec/trc_idec_arminst.cpp",
38        "decoder/source/mem_acc/trc_mem_acc_base.cpp",
39        "decoder/source/mem_acc/trc_mem_acc_bufptr.cpp",
40        "decoder/source/mem_acc/trc_mem_acc_cache.cpp",
41        "decoder/source/mem_acc/trc_mem_acc_cb.cpp",
42        "decoder/source/mem_acc/trc_mem_acc_file.cpp",
43        "decoder/source/mem_acc/trc_mem_acc_mapper.cpp",
44        "decoder/source/ocsd_code_follower.cpp",
45        "decoder/source/ocsd_dcd_tree.cpp",
46        "decoder/source/ocsd_error.cpp",
47        "decoder/source/ocsd_error_logger.cpp",
48        "decoder/source/ocsd_gen_elem_list.cpp",
49        "decoder/source/ocsd_gen_elem_stack.cpp",
50        "decoder/source/ocsd_lib_dcd_register.cpp",
51        "decoder/source/ocsd_msg_logger.cpp",
52        "decoder/source/ocsd_version.cpp",
53        "decoder/source/pkt_printers/gen_elem_printer.cpp",
54        "decoder/source/pkt_printers/raw_frame_printer.cpp",
55        "decoder/source/pkt_printers/trc_print_fact.cpp",
56        "decoder/source/ptm/trc_cmp_cfg_ptm.cpp",
57        "decoder/source/ptm/trc_pkt_decode_ptm.cpp",
58        "decoder/source/ptm/trc_pkt_elem_ptm.cpp",
59        "decoder/source/ptm/trc_pkt_proc_ptm.cpp",
60        "decoder/source/stm/trc_pkt_decode_stm.cpp",
61        "decoder/source/stm/trc_pkt_elem_stm.cpp",
62        "decoder/source/stm/trc_pkt_proc_stm.cpp",
63        "decoder/source/trc_component.cpp",
64        "decoder/source/trc_core_arch_map.cpp",
65        "decoder/source/trc_frame_deformatter.cpp",
66        "decoder/source/trc_frame_deformatter_impl.h",
67        "decoder/source/trc_gen_elem.cpp",
68        "decoder/source/trc_printable_elem.cpp",
69        "decoder/source/trc_ret_stack.cpp",
70    ],
71    hdrs = [
72        "decoder/include/common/comp_attach_notifier_i.h",
73        "decoder/include/common/comp_attach_pt_t.h",
74        "decoder/include/common/ocsd_code_follower.h",
75        "decoder/include/common/ocsd_dcd_mngr.h",
76        "decoder/include/common/ocsd_dcd_mngr_i.h",
77        "decoder/include/common/ocsd_dcd_tree.h",
78        "decoder/include/common/ocsd_dcd_tree_elem.h",
79        "decoder/include/common/ocsd_error.h",
80        "decoder/include/common/ocsd_error_logger.h",
81        "decoder/include/common/ocsd_gen_elem_list.h",
82        "decoder/include/common/ocsd_gen_elem_stack.h",
83        "decoder/include/common/ocsd_lib_dcd_register.h",
84        "decoder/include/common/ocsd_msg_logger.h",
85        "decoder/include/common/ocsd_pe_context.h",
86        "decoder/include/common/ocsd_version.h",
87        "decoder/include/common/trc_component.h",
88        "decoder/include/common/trc_core_arch_map.h",
89        "decoder/include/common/trc_cs_config.h",
90        "decoder/include/common/trc_frame_deformatter.h",
91        "decoder/include/common/trc_gen_elem.h",
92        "decoder/include/common/trc_pkt_decode_base.h",
93        "decoder/include/common/trc_pkt_elem_base.h",
94        "decoder/include/common/trc_pkt_proc_base.h",
95        "decoder/include/common/trc_printable_elem.h",
96        "decoder/include/common/trc_raw_buffer.h",
97        "decoder/include/common/trc_ret_stack.h",
98        "decoder/include/i_dec/trc_i_decode.h",
99        "decoder/include/i_dec/trc_idec_arminst.h",
100        "decoder/include/interfaces/trc_abs_typed_base_i.h",
101        "decoder/include/interfaces/trc_data_raw_in_i.h",
102        "decoder/include/interfaces/trc_data_rawframe_in_i.h",
103        "decoder/include/interfaces/trc_error_log_i.h",
104        "decoder/include/interfaces/trc_gen_elem_in_i.h",
105        "decoder/include/interfaces/trc_indexer_pkt_i.h",
106        "decoder/include/interfaces/trc_indexer_src_i.h",
107        "decoder/include/interfaces/trc_instr_decode_i.h",
108        "decoder/include/interfaces/trc_pkt_in_i.h",
109        "decoder/include/interfaces/trc_pkt_raw_in_i.h",
110        "decoder/include/interfaces/trc_tgt_mem_access_i.h",
111        "decoder/include/mem_acc/trc_mem_acc.h",
112        "decoder/include/mem_acc/trc_mem_acc_base.h",
113        "decoder/include/mem_acc/trc_mem_acc_bufptr.h",
114        "decoder/include/mem_acc/trc_mem_acc_cache.h",
115        "decoder/include/mem_acc/trc_mem_acc_cb.h",
116        "decoder/include/mem_acc/trc_mem_acc_cb_if.h",
117        "decoder/include/mem_acc/trc_mem_acc_file.h",
118        "decoder/include/mem_acc/trc_mem_acc_mapper.h",
119        "decoder/include/opencsd.h",
120        "decoder/include/opencsd/c_api/ocsd_c_api_cust_fact.h",
121        "decoder/include/opencsd/c_api/ocsd_c_api_cust_impl.h",
122        "decoder/include/opencsd/c_api/ocsd_c_api_custom.h",
123        "decoder/include/opencsd/c_api/ocsd_c_api_types.h",
124        "decoder/include/opencsd/c_api/opencsd_c_api.h",
125        "decoder/include/opencsd/ete/ete_decoder.h",
126        "decoder/include/opencsd/ete/trc_cmp_cfg_ete.h",
127        "decoder/include/opencsd/ete/trc_dcd_mngr_ete.h",
128        "decoder/include/opencsd/ete/trc_pkt_types_ete.h",
129        "decoder/include/opencsd/etmv3/etmv3_decoder.h",
130        "decoder/include/opencsd/etmv3/trc_cmp_cfg_etmv3.h",
131        "decoder/include/opencsd/etmv3/trc_dcd_mngr_etmv3.h",
132        "decoder/include/opencsd/etmv3/trc_pkt_decode_etmv3.h",
133        "decoder/include/opencsd/etmv3/trc_pkt_elem_etmv3.h",
134        "decoder/include/opencsd/etmv3/trc_pkt_proc_etmv3.h",
135        "decoder/include/opencsd/etmv3/trc_pkt_types_etmv3.h",
136        "decoder/include/opencsd/etmv4/etmv4_decoder.h",
137        "decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h",
138        "decoder/include/opencsd/etmv4/trc_dcd_mngr_etmv4i.h",
139        "decoder/include/opencsd/etmv4/trc_etmv4_stack_elem.h",
140        "decoder/include/opencsd/etmv4/trc_pkt_decode_etmv4i.h",
141        "decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h",
142        "decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4.h",
143        "decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4i.h",
144        "decoder/include/opencsd/etmv4/trc_pkt_types_etmv4.h",
145        "decoder/include/opencsd/ocsd_if_types.h",
146        "decoder/include/opencsd/ocsd_if_version.h",
147        "decoder/include/opencsd/ptm/ptm_decoder.h",
148        "decoder/include/opencsd/ptm/trc_cmp_cfg_ptm.h",
149        "decoder/include/opencsd/ptm/trc_dcd_mngr_ptm.h",
150        "decoder/include/opencsd/ptm/trc_pkt_decode_ptm.h",
151        "decoder/include/opencsd/ptm/trc_pkt_elem_ptm.h",
152        "decoder/include/opencsd/ptm/trc_pkt_proc_ptm.h",
153        "decoder/include/opencsd/ptm/trc_pkt_types_ptm.h",
154        "decoder/include/opencsd/stm/stm_decoder.h",
155        "decoder/include/opencsd/stm/trc_cmp_cfg_stm.h",
156        "decoder/include/opencsd/stm/trc_dcd_mngr_stm.h",
157        "decoder/include/opencsd/stm/trc_pkt_decode_stm.h",
158        "decoder/include/opencsd/stm/trc_pkt_elem_stm.h",
159        "decoder/include/opencsd/stm/trc_pkt_proc_stm.h",
160        "decoder/include/opencsd/stm/trc_pkt_types_stm.h",
161        "decoder/include/opencsd/trc_gen_elem_types.h",
162        "decoder/include/opencsd/trc_pkt_types.h",
163        "decoder/include/pkt_printers/gen_elem_printer.h",
164        "decoder/include/pkt_printers/item_printer.h",
165        "decoder/include/pkt_printers/pkt_printer_t.h",
166        "decoder/include/pkt_printers/raw_frame_printer.h",
167        "decoder/include/pkt_printers/trc_pkt_printers.h",
168        "decoder/include/pkt_printers/trc_print_fact.h",
169    ],
170    copts = ['-fexceptions'] + PERFETTO_CONFIG.deps_copts.open_csd,
171    defines = [
172        "ENABLE_LARGE_TRACE_SOURCES",
173    ],
174    includes = [
175        "decoder/include",
176    ],
177    visibility = ["//visibility:public"],
178)
179