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 = [ 18 "./", 19 "//third_party/bounds_checking_function/include/", 20 ] 21} 22 23common_sources = [ 24 "ast/ast_array_type.cpp", 25 "ast/ast_boolean_type.cpp", 26 "ast/ast_byte_type.cpp", 27 "ast/ast_char_type.cpp", 28 "ast/ast_double_type.cpp", 29 "ast/ast_float_type.cpp", 30 "ast/ast_integer_type.cpp", 31 "ast/ast_interface_type.cpp", 32 "ast/ast_list_type.cpp", 33 "ast/ast_long_type.cpp", 34 "ast/ast_map_type.cpp", 35 "ast/ast_method.cpp", 36 "ast/ast_module.cpp", 37 "ast/ast_namespace.cpp", 38 "ast/ast_node.cpp", 39 "ast/ast_parameter.cpp", 40 "ast/ast_sequenceable_type.cpp", 41 "ast/ast_short_type.cpp", 42 "ast/ast_string_type.cpp", 43 "ast/ast_type.cpp", 44 "ast/ast_void_type.cpp", 45] 46 47common_sources += [ 48 "codegen/code_emitter.cpp", 49 "codegen/code_generator.cpp", 50 "codegen/cpp_code_emitter.cpp", 51 "codegen/ts_code_emitter.cpp", 52] 53 54common_sources += [ 55 "metadata/metadata_builder.cpp", 56 "metadata/metadata_dumper.cpp", 57 "metadata/metadata_reader.cpp", 58 "metadata/metadata_serializer.cpp", 59] 60 61common_sources += [ 62 "parser/lexer.cpp", 63 "parser/parser.cpp", 64] 65 66common_sources += [ 67 "util/file.cpp", 68 "util/light_refcount_base.cpp", 69 "util/logger.cpp", 70 "util/options.cpp", 71 "util/string.cpp", 72 "util/string_builder.cpp", 73 "util/string_pool.cpp", 74] 75 76ohos_executable("idl") { 77 sources = [ "main.cpp" ] 78 sources += common_sources 79 80 configs = [ ":idl_config" ] 81 82 deps = [ "//third_party/bounds_checking_function:libsec_static" ] 83 84 part_name = "idl_tool" 85 subsystem_name = "ability" 86} 87