• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024-2025 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")
15if ((defined(ark_standalone_build) && ark_standalone_build) ||
16    (defined(ark_static_standalone_build) && ark_static_standalone_build)) {
17  import("//arkcompiler/runtime_core/static_core/ark_config.gni")
18} else {
19  import(
20      "//build/config/components/runtime_core/static_core/ark_common_config.gni")
21}
22
23ohos_executable("dependency_analyzer") {
24  sources = [
25    "dep_analyzer.cpp",
26    "main.cpp",
27  ]
28
29  include_dirs = [ "$target_gen_dir" ]
30  if ((defined(ark_standalone_build) && ark_standalone_build) ||
31      (defined(ark_static_standalone_build) && ark_static_standalone_build)) {
32    configs = [ "$ark_root:ark_config" ]
33  } else {
34    configs = [
35      "//build/config/components/runtime_core/static_core:ark_common_config",
36    ]
37  }
38  configs += [ "$ark_es2panda_root:libes2panda_public_config" ]
39
40  deps = [
41    "$ark_es2panda_root:libes2panda_frontend_static",
42    "$ark_es2panda_root:libes2panda_public_frontend_static",
43  ]
44
45  if (ark_standalone_build) {
46    deps += [
47      "$ark_root/bytecode_optimizer:libarktsbytecodeopt_package",
48      "$ark_root/libpandabase:libarktsbase_package",
49      "$ark_root/libpandafile:libarktsfile_package",
50    ]
51  }
52
53  external_deps = [
54    "runtime_core:assembler_headers",
55    "runtime_core:libarktsassembler_package",
56    "runtime_core:libarktsbase_package",
57    "runtime_core:libarktsbytecodeopt_package",
58    "runtime_core:libarktscompiler_package",
59    "runtime_core:libarktsfile_package",
60    "runtime_core:libpandabase_headers",
61    "runtime_core:libpandafile_headers",
62    sdk_libc_secshared_dep,
63  ]
64
65  libs = platform_libs
66  ldflags = platform_ldflags
67  if (is_linux) {
68    libs += [ "stdc++fs" ]
69  }
70
71  install_enable = true
72  part_name = "ets_frontend"
73  subsystem_name = "arkcompiler"
74}
75