1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16config("idl_config") { 17 include_dirs = [ "./idl_tool_2" ] 18} 19 20common_sources = [ 21 "idl_tool_2/ast/base/ast_boolean_type.cpp", 22 "idl_tool_2/ast/base/ast_boolean_type.h", 23 "idl_tool_2/ast/base/ast_byte_type.cpp", 24 "idl_tool_2/ast/base/ast_byte_type.h", 25 "idl_tool_2/ast/base/ast_char_type.cpp", 26 "idl_tool_2/ast/base/ast_char_type.h", 27 "idl_tool_2/ast/base/ast_double_type.cpp", 28 "idl_tool_2/ast/base/ast_double_type.h", 29 "idl_tool_2/ast/base/ast_float_type.cpp", 30 "idl_tool_2/ast/base/ast_float_type.h", 31 "idl_tool_2/ast/base/ast_integer_type.cpp", 32 "idl_tool_2/ast/base/ast_integer_type.h", 33 "idl_tool_2/ast/base/ast_long_type.cpp", 34 "idl_tool_2/ast/base/ast_long_type.h", 35 "idl_tool_2/ast/base/ast_short_type.cpp", 36 "idl_tool_2/ast/base/ast_short_type.h", 37 "idl_tool_2/ast/base/ast_string16_type.cpp", 38 "idl_tool_2/ast/base/ast_string16_type.h", 39 "idl_tool_2/ast/base/ast_string_type.cpp", 40 "idl_tool_2/ast/base/ast_string_type.h", 41 "idl_tool_2/ast/base/ast_uchar_type.cpp", 42 "idl_tool_2/ast/base/ast_uchar_type.h", 43 "idl_tool_2/ast/base/ast_uint_type.cpp", 44 "idl_tool_2/ast/base/ast_uint_type.h", 45 "idl_tool_2/ast/base/ast_ulong_type.cpp", 46 "idl_tool_2/ast/base/ast_ulong_type.h", 47 "idl_tool_2/ast/base/ast_ushort_type.cpp", 48 "idl_tool_2/ast/base/ast_ushort_type.h", 49] 50 51common_sources += [ 52 "idl_tool_2/ast/ast.cpp", 53 "idl_tool_2/ast/ast.h", 54 "idl_tool_2/ast/ast_array_type.cpp", 55 "idl_tool_2/ast/ast_array_type.h", 56 "idl_tool_2/ast/ast_attribute.cpp", 57 "idl_tool_2/ast/ast_attribute.h", 58 "idl_tool_2/ast/ast_enum_type.cpp", 59 "idl_tool_2/ast/ast_enum_type.h", 60 "idl_tool_2/ast/ast_expr.cpp", 61 "idl_tool_2/ast/ast_expr.h", 62 "idl_tool_2/ast/ast_fd_type.cpp", 63 "idl_tool_2/ast/ast_fd_type.h", 64 "idl_tool_2/ast/ast_interface_type.cpp", 65 "idl_tool_2/ast/ast_interface_type.h", 66 "idl_tool_2/ast/ast_map_type.cpp", 67 "idl_tool_2/ast/ast_map_type.h", 68 "idl_tool_2/ast/ast_method.cpp", 69 "idl_tool_2/ast/ast_method.h", 70 "idl_tool_2/ast/ast_namespace.cpp", 71 "idl_tool_2/ast/ast_namespace.h", 72 "idl_tool_2/ast/ast_native_buffer_type.cpp", 73 "idl_tool_2/ast/ast_native_buffer_type.h", 74 "idl_tool_2/ast/ast_node.cpp", 75 "idl_tool_2/ast/ast_node.h", 76 "idl_tool_2/ast/ast_parameter.cpp", 77 "idl_tool_2/ast/ast_parameter.h", 78 "idl_tool_2/ast/ast_pointer_type.cpp", 79 "idl_tool_2/ast/ast_pointer_type.h", 80 "idl_tool_2/ast/ast_sequenceable_type.cpp", 81 "idl_tool_2/ast/ast_sequenceable_type.h", 82 "idl_tool_2/ast/ast_smq_type.cpp", 83 "idl_tool_2/ast/ast_smq_type.h", 84 "idl_tool_2/ast/ast_struct_type.cpp", 85 "idl_tool_2/ast/ast_struct_type.h", 86 "idl_tool_2/ast/ast_type.cpp", 87 "idl_tool_2/ast/ast_type.h", 88 "idl_tool_2/ast/ast_union_type.cpp", 89 "idl_tool_2/ast/ast_union_type.h", 90 "idl_tool_2/ast/ast_void_type.cpp", 91 "idl_tool_2/ast/ast_void_type.h", 92] 93 94common_sources += [ 95 "idl_tool_2/codegen/HDI/c/c_client_proxy_code_emitter.cpp", 96 "idl_tool_2/codegen/HDI/c/c_client_proxy_code_emitter.h", 97 "idl_tool_2/codegen/HDI/c/c_custom_types_code_emitter.cpp", 98 "idl_tool_2/codegen/HDI/c/c_custom_types_code_emitter.h", 99 "idl_tool_2/codegen/HDI/c/c_interface_code_emitter.cpp", 100 "idl_tool_2/codegen/HDI/c/c_interface_code_emitter.h", 101 "idl_tool_2/codegen/HDI/c/c_service_driver_code_emitter.cpp", 102 "idl_tool_2/codegen/HDI/c/c_service_driver_code_emitter.h", 103 "idl_tool_2/codegen/HDI/c/c_service_impl_code_emitter.cpp", 104 "idl_tool_2/codegen/HDI/c/c_service_impl_code_emitter.h", 105 "idl_tool_2/codegen/HDI/c/c_service_stub_code_emitter.cpp", 106 "idl_tool_2/codegen/HDI/c/c_service_stub_code_emitter.h", 107 "idl_tool_2/codegen/HDI/c/hdi_c_code_emitter.cpp", 108 "idl_tool_2/codegen/HDI/c/hdi_c_code_emitter.h", 109] 110 111common_sources += [ 112 "idl_tool_2/codegen/HDI/cpp/cpp_client_proxy_code_emitter.cpp", 113 "idl_tool_2/codegen/HDI/cpp/cpp_client_proxy_code_emitter.h", 114 "idl_tool_2/codegen/HDI/cpp/cpp_custom_types_code_emitter.cpp", 115 "idl_tool_2/codegen/HDI/cpp/cpp_custom_types_code_emitter.h", 116 "idl_tool_2/codegen/HDI/cpp/cpp_interface_code_emitter.cpp", 117 "idl_tool_2/codegen/HDI/cpp/cpp_interface_code_emitter.h", 118 "idl_tool_2/codegen/HDI/cpp/cpp_service_driver_code_emitter.cpp", 119 "idl_tool_2/codegen/HDI/cpp/cpp_service_driver_code_emitter.h", 120 "idl_tool_2/codegen/HDI/cpp/cpp_service_impl_code_emitter.cpp", 121 "idl_tool_2/codegen/HDI/cpp/cpp_service_impl_code_emitter.h", 122 "idl_tool_2/codegen/HDI/cpp/cpp_service_stub_code_emitter.cpp", 123 "idl_tool_2/codegen/HDI/cpp/cpp_service_stub_code_emitter.h", 124 "idl_tool_2/codegen/HDI/cpp/hdi_cpp_code_emitter.cpp", 125 "idl_tool_2/codegen/HDI/cpp/hdi_cpp_code_emitter.h", 126] 127 128common_sources += [ 129 "idl_tool_2/codegen/HDI/java/hdi_java_code_emitter.cpp", 130 "idl_tool_2/codegen/HDI/java/hdi_java_code_emitter.h", 131 "idl_tool_2/codegen/HDI/java/java_client_interface_code_emitter.cpp", 132 "idl_tool_2/codegen/HDI/java/java_client_interface_code_emitter.h", 133 "idl_tool_2/codegen/HDI/java/java_client_proxy_code_emitter.cpp", 134 "idl_tool_2/codegen/HDI/java/java_client_proxy_code_emitter.h", 135] 136 137common_sources += [ 138 "idl_tool_2/codegen/HDI/type/hdi_array_type_emitter.cpp", 139 "idl_tool_2/codegen/HDI/type/hdi_array_type_emitter.h", 140 "idl_tool_2/codegen/HDI/type/hdi_boolean_type_emitter.cpp", 141 "idl_tool_2/codegen/HDI/type/hdi_boolean_type_emitter.h", 142 "idl_tool_2/codegen/HDI/type/hdi_byte_type_emitter.cpp", 143 "idl_tool_2/codegen/HDI/type/hdi_byte_type_emitter.h", 144 "idl_tool_2/codegen/HDI/type/hdi_double_type_emitter.cpp", 145 "idl_tool_2/codegen/HDI/type/hdi_double_type_emitter.h", 146 "idl_tool_2/codegen/HDI/type/hdi_enum_type_emitter.cpp", 147 "idl_tool_2/codegen/HDI/type/hdi_enum_type_emitter.h", 148 "idl_tool_2/codegen/HDI/type/hdi_fd_type_emitter.cpp", 149 "idl_tool_2/codegen/HDI/type/hdi_fd_type_emitter.h", 150 "idl_tool_2/codegen/HDI/type/hdi_float_type_emitter.cpp", 151 "idl_tool_2/codegen/HDI/type/hdi_float_type_emitter.h", 152 "idl_tool_2/codegen/HDI/type/hdi_int_type_emitter.cpp", 153 "idl_tool_2/codegen/HDI/type/hdi_int_type_emitter.h", 154 "idl_tool_2/codegen/HDI/type/hdi_interface_type_emitter.cpp", 155 "idl_tool_2/codegen/HDI/type/hdi_interface_type_emitter.h", 156 "idl_tool_2/codegen/HDI/type/hdi_long_type_emitter.cpp", 157 "idl_tool_2/codegen/HDI/type/hdi_long_type_emitter.h", 158 "idl_tool_2/codegen/HDI/type/hdi_map_type_emitter.cpp", 159 "idl_tool_2/codegen/HDI/type/hdi_map_type_emitter.h", 160 "idl_tool_2/codegen/HDI/type/hdi_native_buffer_type_emitter.cpp", 161 "idl_tool_2/codegen/HDI/type/hdi_native_buffer_type_emitter.h", 162 "idl_tool_2/codegen/HDI/type/hdi_pointer_type_emitter.cpp", 163 "idl_tool_2/codegen/HDI/type/hdi_pointer_type_emitter.h", 164 "idl_tool_2/codegen/HDI/type/hdi_seq_type_emitter.cpp", 165 "idl_tool_2/codegen/HDI/type/hdi_seq_type_emitter.h", 166 "idl_tool_2/codegen/HDI/type/hdi_short_type_emitter.cpp", 167 "idl_tool_2/codegen/HDI/type/hdi_short_type_emitter.h", 168 "idl_tool_2/codegen/HDI/type/hdi_smq_type_emitter.cpp", 169 "idl_tool_2/codegen/HDI/type/hdi_smq_type_emitter.h", 170 "idl_tool_2/codegen/HDI/type/hdi_string_type_emitter.cpp", 171 "idl_tool_2/codegen/HDI/type/hdi_string_type_emitter.h", 172 "idl_tool_2/codegen/HDI/type/hdi_struct_type_emitter.cpp", 173 "idl_tool_2/codegen/HDI/type/hdi_struct_type_emitter.h", 174 "idl_tool_2/codegen/HDI/type/hdi_uchar_type_emitter.cpp", 175 "idl_tool_2/codegen/HDI/type/hdi_uchar_type_emitter.h", 176 "idl_tool_2/codegen/HDI/type/hdi_uint_type_emitter.cpp", 177 "idl_tool_2/codegen/HDI/type/hdi_uint_type_emitter.h", 178 "idl_tool_2/codegen/HDI/type/hdi_ulong_type_emitter.cpp", 179 "idl_tool_2/codegen/HDI/type/hdi_ulong_type_emitter.h", 180 "idl_tool_2/codegen/HDI/type/hdi_union_type_emitter.cpp", 181 "idl_tool_2/codegen/HDI/type/hdi_union_type_emitter.h", 182 "idl_tool_2/codegen/HDI/type/hdi_ushort_type_emitter.cpp", 183 "idl_tool_2/codegen/HDI/type/hdi_ushort_type_emitter.h", 184] 185 186common_sources += [ 187 "idl_tool_2/codegen/HDI/hdi_code_emitter.cpp", 188 "idl_tool_2/codegen/HDI/hdi_code_emitter.h", 189 "idl_tool_2/codegen/HDI/hdi_code_generator.cpp", 190 "idl_tool_2/codegen/HDI/hdi_code_generator.h", 191 "idl_tool_2/codegen/HDI/hdi_type_emitter.cpp", 192 "idl_tool_2/codegen/HDI/hdi_type_emitter.h", 193] 194 195common_sources += [ 196 "idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp", 197 "idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.h", 198 "idl_tool_2/codegen/SA/cpp/sa_cpp_code_emitter.cpp", 199 "idl_tool_2/codegen/SA/cpp/sa_cpp_code_emitter.h", 200 "idl_tool_2/codegen/SA/cpp/sa_cpp_interface_code_emitter.cpp", 201 "idl_tool_2/codegen/SA/cpp/sa_cpp_interface_code_emitter.h", 202 "idl_tool_2/codegen/SA/cpp/sa_cpp_service_stub_code_emitter.cpp", 203 "idl_tool_2/codegen/SA/cpp/sa_cpp_service_stub_code_emitter.h", 204] 205 206common_sources += [ 207 "idl_tool_2/codegen/SA/rust/sa_rust_code_emitter.cpp", 208 "idl_tool_2/codegen/SA/rust/sa_rust_code_emitter.h", 209 "idl_tool_2/codegen/SA/rust/sa_rust_interface_code_emitter.cpp", 210 "idl_tool_2/codegen/SA/rust/sa_rust_interface_code_emitter.h", 211] 212 213common_sources += [ 214 "idl_tool_2/codegen/SA/ts/sa_ts_client_proxy_code_emitter.cpp", 215 "idl_tool_2/codegen/SA/ts/sa_ts_client_proxy_code_emitter.h", 216 "idl_tool_2/codegen/SA/ts/sa_ts_code_emitter.cpp", 217 "idl_tool_2/codegen/SA/ts/sa_ts_code_emitter.h", 218 "idl_tool_2/codegen/SA/ts/sa_ts_interface_code_emitter.cpp", 219 "idl_tool_2/codegen/SA/ts/sa_ts_interface_code_emitter.h", 220 "idl_tool_2/codegen/SA/ts/sa_ts_service_stub_code_emitter.cpp", 221 "idl_tool_2/codegen/SA/ts/sa_ts_service_stub_code_emitter.h", 222] 223 224common_sources += [ 225 "idl_tool_2/codegen/SA/type/sa_array_type_emitter.cpp", 226 "idl_tool_2/codegen/SA/type/sa_array_type_emitter.h", 227 "idl_tool_2/codegen/SA/type/sa_boolean_type_emitter.cpp", 228 "idl_tool_2/codegen/SA/type/sa_boolean_type_emitter.h", 229 "idl_tool_2/codegen/SA/type/sa_byte_type_emitter.cpp", 230 "idl_tool_2/codegen/SA/type/sa_byte_type_emitter.h", 231 "idl_tool_2/codegen/SA/type/sa_char_type_emitter.cpp", 232 "idl_tool_2/codegen/SA/type/sa_char_type_emitter.h", 233 "idl_tool_2/codegen/SA/type/sa_double_type_emitter.cpp", 234 "idl_tool_2/codegen/SA/type/sa_double_type_emitter.h", 235 "idl_tool_2/codegen/SA/type/sa_float_type_emitter.cpp", 236 "idl_tool_2/codegen/SA/type/sa_float_type_emitter.h", 237 "idl_tool_2/codegen/SA/type/sa_int_type_emitter.cpp", 238 "idl_tool_2/codegen/SA/type/sa_int_type_emitter.h", 239 "idl_tool_2/codegen/SA/type/sa_interface_type_emitter.cpp", 240 "idl_tool_2/codegen/SA/type/sa_interface_type_emitter.h", 241 "idl_tool_2/codegen/SA/type/sa_long_type_emitter.cpp", 242 "idl_tool_2/codegen/SA/type/sa_long_type_emitter.h", 243 "idl_tool_2/codegen/SA/type/sa_map_type_emitter.cpp", 244 "idl_tool_2/codegen/SA/type/sa_map_type_emitter.h", 245 "idl_tool_2/codegen/SA/type/sa_seq_type_emitter.cpp", 246 "idl_tool_2/codegen/SA/type/sa_seq_type_emitter.h", 247 "idl_tool_2/codegen/SA/type/sa_short_type_emitter.cpp", 248 "idl_tool_2/codegen/SA/type/sa_short_type_emitter.h", 249 "idl_tool_2/codegen/SA/type/sa_string_type_emitter.cpp", 250 "idl_tool_2/codegen/SA/type/sa_string_type_emitter.h", 251] 252 253common_sources += [ 254 "idl_tool_2/codegen/SA/sa_code_emitter.cpp", 255 "idl_tool_2/codegen/SA/sa_code_emitter.h", 256 "idl_tool_2/codegen/SA/sa_code_generator.cpp", 257 "idl_tool_2/codegen/SA/sa_code_generator.h", 258 "idl_tool_2/codegen/SA/sa_type_emitter.cpp", 259 "idl_tool_2/codegen/SA/sa_type_emitter.h", 260] 261 262common_sources += [ 263 "idl_tool_2/codegen/code_emitter.cpp", 264 "idl_tool_2/codegen/code_emitter.h", 265 "idl_tool_2/codegen/code_generator.cpp", 266 "idl_tool_2/codegen/code_generator.h", 267] 268 269common_sources += [ 270 "idl_tool_2/hash/hash.cpp", 271 "idl_tool_2/hash/hash.h", 272] 273 274common_sources += [ 275 "idl_tool_2/lexer/lexer.cpp", 276 "idl_tool_2/lexer/lexer.h", 277 "idl_tool_2/lexer/token.cpp", 278 "idl_tool_2/lexer/token.h", 279] 280 281common_sources += [ 282 "idl_tool_2/metadata/meta_component.h", 283 "idl_tool_2/metadata/meta_interface.h", 284 "idl_tool_2/metadata/meta_method.h", 285 "idl_tool_2/metadata/meta_namespace.h", 286 "idl_tool_2/metadata/meta_patameter.h", 287 "idl_tool_2/metadata/meta_sequenceable.h", 288 "idl_tool_2/metadata/meta_type.h", 289 "idl_tool_2/metadata/metadata_builder.cpp", 290 "idl_tool_2/metadata/metadata_builder.h", 291 "idl_tool_2/metadata/metadata_dumper.cpp", 292 "idl_tool_2/metadata/metadata_dumper.h", 293 "idl_tool_2/metadata/metadata_reader.cpp", 294 "idl_tool_2/metadata/metadata_reader.h", 295 "idl_tool_2/metadata/metadata_serializer.cpp", 296 "idl_tool_2/metadata/metadata_serializer.h", 297] 298 299common_sources += [ 300 "idl_tool_2/parser/intf_type_check.cpp", 301 "idl_tool_2/parser/intf_type_check.h", 302 "idl_tool_2/parser/parser.cpp", 303 "idl_tool_2/parser/parser.h", 304] 305 306common_sources += [ 307 "idl_tool_2/preprocessor/preprocessor.cpp", 308 "idl_tool_2/preprocessor/preprocessor.h", 309] 310 311common_sources += [ 312 "idl_tool_2/util/autoptr.h", 313 "idl_tool_2/util/common.h", 314 "idl_tool_2/util/file.cpp", 315 "idl_tool_2/util/file.h", 316 "idl_tool_2/util/light_refcount_base.cpp", 317 "idl_tool_2/util/light_refcount_base.h", 318 "idl_tool_2/util/logger.cpp", 319 "idl_tool_2/util/logger.h", 320 "idl_tool_2/util/options.cpp", 321 "idl_tool_2/util/options.h", 322 "idl_tool_2/util/string_builder.cpp", 323 "idl_tool_2/util/string_builder.h", 324 "idl_tool_2/util/string_helper.cpp", 325 "idl_tool_2/util/string_helper.h", 326 "idl_tool_2/util/string_pool.cpp", 327 "idl_tool_2/util/string_pool.h", 328] 329 330ohos_executable("idl") { 331 sources = [ "idl_tool_2/main.cpp" ] 332 sources += common_sources 333 334 remove_configs = [ "//build/config/compiler:no_rtti" ] 335 336 configs = [ ":idl_config" ] 337 use_exceptions = true 338 339 external_deps = [ "bounds_checking_function:libsec_static" ] 340 341 install_enable = false 342 part_name = "idl_tool" 343 subsystem_name = "ability" 344} 345