• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/rust_code_emitter.cpp",
52  "codegen/ts_code_emitter.cpp",
53]
54
55common_sources += [
56  "metadata/metadata_builder.cpp",
57  "metadata/metadata_dumper.cpp",
58  "metadata/metadata_reader.cpp",
59  "metadata/metadata_serializer.cpp",
60]
61
62common_sources += [
63  "parser/lexer.cpp",
64  "parser/parser.cpp",
65]
66
67common_sources += [
68  "util/file.cpp",
69  "util/light_refcount_base.cpp",
70  "util/logger.cpp",
71  "util/options.cpp",
72  "util/string.cpp",
73  "util/string_builder.cpp",
74  "util/string_pool.cpp",
75]
76
77ohos_executable("idl") {
78  sources = [ "main.cpp" ]
79  sources += common_sources
80
81  configs = [ ":idl_config" ]
82
83  deps = [ "//third_party/bounds_checking_function:libsec_static" ]
84
85  part_name = "idl_tool"
86  subsystem_name = "ability"
87}
88