• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/ets_runtime/js_runtime_config.gni")
15import("//build/ohos.gni")
16import("//build/ohos/sa_profile/sa_profile.gni")
17
18declare_args() {
19  code_sign_enable = true
20
21  if (defined(global_parts_info) &&
22      !defined(global_parts_info.security_code_signature)) {
23    code_sign_enable = false
24  }
25}
26
27config("aot_compiler_service_config") {
28  visibility = [ ":*" ]
29  include_dirs = [
30    "include",
31    "interface",
32  ]
33}
34
35ohos_shared_library("libcompiler_service") {
36  public_configs = [ ":aot_compiler_service_config" ]
37  configs = [ "$js_root:ark_jsruntime_public_config" ]
38  shlib_type = "sa"
39  version_script = "libaot_compiler_service.map"
40  sources = [
41    "${js_root}/ecmascript/log.cpp",
42    "interface/aot_compiler_interface_proxy.cpp",
43    "interface/aot_compiler_interface_stub.cpp",
44    "src/aot_compiler_client.cpp",
45    "src/aot_compiler_error_utils.cpp",
46    "src/aot_compiler_impl.cpp",
47    "src/aot_compiler_load_callback.cpp",
48    "src/aot_compiler_service.cpp",
49    "src/power_disconnected_listener.cpp",
50    "src/screen_status_listener.cpp",
51  ]
52  external_deps = [
53    "access_token:libaccesstoken_sdk",
54    "access_token:libtokenid_sdk",
55    "c_utils:utils",
56    "common_event_service:cesfwk_innerkits",
57    "eventhandler:libeventhandler",
58    "hilog:libhilog",
59    "hisysevent:libhisysevent",
60    "hitrace:hitrace_meter",
61    "icu:shared_icui18n",
62    "icu:shared_icuuc",
63    "ipc:ipc_core",
64    "runtime_core:libarkfile_static",
65    "safwk:system_ability_fwk",
66    "samgr:samgr_proxy",
67  ]
68
69  defines = []
70  if (code_sign_enable) {
71    external_deps += [ "code_signature:liblocal_code_sign_sdk" ]
72    defines += [ "CODE_SIGN_ENABLE" ]
73  }
74
75  install_enable = true
76  install_images = [ "system" ]
77
78  part_name = "ets_runtime"
79  subsystem_name = "arkcompiler"
80}
81
82ohos_prebuilt_etc("compiler_service_cfg") {
83  source = "compiler_service.cfg"
84  relative_install_dir = "init"
85  part_name = "ets_runtime"
86  subsystem_name = "arkcompiler"
87}
88
89ohos_sa_profile("compiler_sa_profile") {
90  sources = [ "sa_profile/5300.json" ]
91  part_name = "ets_runtime"
92}
93
94group("compiler_service") {
95  deps = [
96    ":compiler_sa_profile",
97    ":compiler_service_cfg",
98    ":libcompiler_service",
99  ]
100}
101