1# Copyright (c) 2021-2024 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("//arkcompiler/runtime_core/static_core/ark_config.gni")
15import("//build/ohos.gni")
16
17ohos_executable("declgen_ets2ts") {
18  sources = [
19    "declgenEts2Ts.cpp",
20    "main.cpp",
21  ]
22
23  include_dirs = [ "$target_gen_dir" ]
24
25  configs = [
26    "$ark_root:ark_config",
27    "$ark_es2panda_root:libes2panda_public_config",
28    "$ark_root/assembler:arkassembler_public_config",
29    "$ark_root/libpandafile:arkfile_public_config",
30    "$ark_root/libpandabase:arkbase_public_config",
31    "$ark_root/bytecode_optimizer:bytecodeopt_public_config",
32    "$ark_root/compiler:arkcompiler_public_config",
33    "$ark_root/runtime:arkruntime_public_config",
34  ]
35
36  deps = [
37    "$ark_es2panda_root:libes2panda_frontend_static",
38    "$ark_es2panda_root:libes2panda_public_frontend_static",
39  ]
40  external_deps = [
41    "runtime_core:libarktsassembler_package",
42    "runtime_core:libarktsbase_package",
43    "runtime_core:libarktsbytecodeopt_package",
44    "runtime_core:libarktscompiler_package",
45    "runtime_core:libarktsfile_package",
46  ]
47
48  libs = platform_libs
49  ldflags = platform_ldflags
50  if (is_linux) {
51    libs += [ "stdc++fs" ]
52  }
53
54  install_enable = true
55  part_name = "ets_frontend"
56  subsystem_name = "arkcompiler"
57}
58