• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni")
17
18ohos_shared_library("ani_overlay") {
19  branch_protector_ret = "pac_ret"
20
21  sanitize = {
22    boundary_sanitize = true
23    cfi = true
24    cfi_cross_dso = true
25    debug = false
26    integer_overflow = true
27    ubsan = true
28  }
29
30  include_dirs = [
31    "${kits_path}/ani/common",
32    "${kits_path}/ani/overlay",
33    "${kits_path}/js/common",
34  ]
35  defines = [
36    "APP_LOG_TAG = \"BMS\"",
37    "LOG_DOMAIN = 0xD001120",
38  ]
39
40  cflags = [
41    "-Os",
42    "-fstack-protector-strong",
43  ]
44
45  cflags_cc = [
46    "-Os",
47    "-fstack-protector-strong",
48  ]
49
50  if (bundle_framework_overlay_install) {
51    sources = [ "ani_overlay.cpp" ]
52  } else {
53    sources = [ "ani_overlay_unsupported.cpp" ]
54  }
55
56  deps = [
57    "${base_path}:appexecfwk_base",
58    "${common_path}:libappexecfwk_common",
59    "${core_path}:appexecfwk_core",
60    "${kits_path}/ani/common:bms_ani_common",
61    "${kits_path}/js/common:bundle_napi_common",
62  ]
63
64  external_deps = [
65    "ability_base:want",
66    "c_utils:utils",
67    "hilog:libhilog",
68    "ipc:ipc_single",
69    "napi:ace_napi",
70    "runtime_core:ani",
71    "runtime_core:ani_helpers",
72  ]
73
74  subsystem_name = "bundlemanager"
75  part_name = "bundle_framework"
76}
77
78generate_static_abc("overlay") {
79  base_url = "./ets"
80  files = [ "./ets/@ohos.bundle.overlay.ets" ]
81  is_boot_abc = "True"
82  device_dst_file = "/system/framework/overlay.abc"
83}
84
85ohos_prebuilt_etc("overlay_etc") {
86  source = "$target_out_dir/overlay.abc"
87  module_install_dir = "framework"
88  subsystem_name = "bundlemanager"
89  part_name = "bundle_framework"
90  deps = [ ":overlay" ]
91}
92
93generate_static_abc("overlay_module_info") {
94  base_url = "./ets"
95  files = [
96    "./ets/bundleManager/OverlayModuleInfo.ets",
97    "./ets/bundleManager/OverlayModuleInfoInner.ets",
98  ]
99  is_boot_abc = "True"
100  device_dst_file = "/system/framework/overlay_module_info.abc"
101}
102
103ohos_prebuilt_etc("overlay_module_info_etc") {
104  source = "$target_out_dir/overlay_module_info.abc"
105  module_install_dir = "framework"
106  subsystem_name = "bundlemanager"
107  part_name = "bundle_framework"
108  deps = [ ":overlay_module_info" ]
109}
110