• 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_zlib") {
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  defines = [
31    "APP_LOG_TAG = \"BMS\"",
32    "LOG_DOMAIN = 0xD001120",
33  ]
34
35  include_dirs = [
36    "${inner_api_path}/appexecfwk_core/include",
37    "${kits_path}/ani/zlib",
38    "${kits_path}/ani/common",
39    "${kits_path}/js/common",
40    "${kits_path}/js/zip/include",
41    "${kits_path}/js/zip/napi",
42  ]
43
44  sources = [
45    "${kits_path}/js/zip/src/file_path.cpp",
46    "${kits_path}/js/zip/src/zip_internal.cpp",
47    "${kits_path}/js/zip/src/zip_reader.cpp",
48    "${kits_path}/js/zip/src/zip_utils.cpp",
49    "${kits_path}/js/zip/src/zip_writer.cpp",
50    "${kits_path}/js/zip/src/zip.cpp",
51    "ani_zlib.cpp",
52  ]
53
54  cflags = [
55    "-Os",
56    "-fstack-protector-strong",
57  ]
58
59  cflags_cc = [
60    "-Os",
61    "-fstack-protector-strong",
62  ]
63
64  deps = [
65    "${base_path}:appexecfwk_base",
66    "${common_path}:libappexecfwk_common",
67    "${core_path}:appexecfwk_core",
68    "${kits_path}/ani/common:bms_ani_common",
69    "${kits_path}/js/common:bundle_napi_common",
70  ]
71
72  external_deps = [
73    "ability_base:want",
74    "c_utils:utils",
75    "common_event_service:cesfwk_core",
76    "common_event_service:cesfwk_innerkits",
77    "eventhandler:libeventhandler",
78    "ffrt:libffrt",
79    "hilog:libhilog",
80    "ipc:ipc_core",
81    "napi:ace_napi",
82    "runtime_core:ani",
83    "runtime_core:ani_helpers",
84    "samgr:samgr_proxy",
85    "zlib:shared_libz",
86  ]
87
88  subsystem_name = "bundlemanager"
89  part_name = "bundle_framework"
90}
91
92generate_static_abc("zlib") {
93  base_url = "./ets"
94  files = [ "./ets/@ohos.zlib.ets" ]
95  is_boot_abc = "True"
96  device_dst_file = "/system/framework/zlib.abc"
97}
98
99ohos_prebuilt_etc("zlib_etc") {
100  source = "$target_out_dir/zlib.abc"
101  module_install_dir = "framework"
102  subsystem_name = "bundlemanager"
103  part_name = "bundle_framework"
104  deps = [ ":zlib" ]
105}
106