• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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")
15import("../../../appexecfwk.gni")
16
17config("appexecfwk_base_sdk_config") {
18  include_dirs = [
19    "include",
20    "include/bundle_resource",
21    "include/clone",
22    "include/distributed_manager",
23    "include/free_install",
24    "include/overlay",
25    "include/plugin",
26    "include/quick_fix",
27    "include/shared",
28  ]
29}
30
31ohos_shared_library("appexecfwk_base") {
32  branch_protector_ret = "pac_ret"
33
34  sanitize = {
35    boundary_sanitize = true
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39    integer_overflow = true
40    ubsan = true
41  }
42
43  sources = [
44    "src/ability_info.cpp",
45    "src/app_jump_control_rule.cpp",
46    "src/app_provision_info.cpp",
47    "src/app_running_control_rule.cpp",
48    "src/app_running_control_rule_result.cpp",
49    "src/application_info.cpp",
50    "src/bms_json_util.cpp",
51    "src/bundle_additional_info.cpp",
52    "src/bundle_dir.cpp",
53    "src/bundle_distribution_type.cpp",
54    "src/bundle_info.cpp",
55    "src/bundle_pack_info.cpp",
56    "src/bundle_resource/bundle_resource_info.cpp",
57    "src/bundle_resource/bundle_system_state.cpp",
58    "src/bundle_resource/launcher_ability_resource_info.cpp",
59    "src/bundle_storage_stats.cpp",
60    "src/bundle_user_info.cpp",
61    "src/clone/clone_param.cpp",
62    "src/code_protect_bundle_info.cpp",
63    "src/common_event_info.cpp",
64    "src/compatible_ability_info.cpp",
65    "src/compatible_application_info.cpp",
66    "src/data_group_info.cpp",
67    "src/disposed_rule.cpp",
68    "src/distributed_ability_info.cpp",
69    "src/distributed_bundle_info.cpp",
70    "src/distributed_manager/rpc_id_result.cpp",
71    "src/distributed_module_info.cpp",
72    "src/dynamic_icon_info.cpp",
73    "src/extension_ability_info.cpp",
74    "src/extension_form_info.cpp",
75    "src/extension_form_profile.cpp",
76    "src/form_info.cpp",
77    "src/free_install/dispatch_info.cpp",
78    "src/free_install/install_result.cpp",
79    "src/free_install/target_ability_info.cpp",
80    "src/hap_module_info.cpp",
81    "src/install_param.cpp",
82    "src/mime_type_mgr.cpp",
83    "src/module_info.cpp",
84    "src/overlay/overlay_bundle_info.cpp",
85    "src/overlay/overlay_module_info.cpp",
86    "src/perf_profile.cpp",
87    "src/permission_define.cpp",
88    "src/plugin/install_plugin_param.cpp",
89    "src/plugin/plugin_bundle_info.cpp",
90    "src/plugin/plugin_module_info.cpp",
91    "src/preinstalled_application_info.cpp",
92    "src/quick_fix/app_quick_fix.cpp",
93    "src/quick_fix/appqf_info.cpp",
94    "src/quick_fix/hqf_info.cpp",
95    "src/recoverable_application_info.cpp",
96    "src/remote_ability_info.cpp",
97    "src/shared/base_shared_bundle_info.cpp",
98    "src/shared/shared_bundle_info.cpp",
99    "src/shared/shared_module_info.cpp",
100    "src/shortcut_info.cpp",
101    "src/skill.cpp",
102    "src/module_test_runner.cpp",
103  ]
104
105  public_configs = [
106    ":appexecfwk_base_sdk_config",
107    "${common_path}:appexecfwk_common_config",
108  ]
109
110  defines = [
111    "APP_LOG_TAG = \"BMS\"",
112    "LOG_DOMAIN = 0xD001120",
113  ]
114
115  cflags = [
116    "-Os",
117    "-fstack-protector-strong",
118  ]
119
120  cflags_cc = [
121    "-Os",
122    "-fstack-protector-strong",
123  ]
124
125  use_exceptions = true
126  if (target_cpu == "arm") {
127    cflags += [ "-DBINDER_IPC_32BIT" ]
128  }
129  deps = [ "${common_path}:libappexecfwk_common" ]
130
131  external_deps = [
132    "c_utils:utils",
133    "common_event_service:cesfwk_innerkits",
134    "hilog:libhilog",
135    "ipc:ipc_single",
136  ]
137
138  if (udmf_enabled) {
139    defines += [ "BUNDLE_FRAMEWORK_UDMF_ENABLED" ]
140    external_deps += [ "udmf:utd_client" ]
141  }
142
143  if (bundle_framework_form_dimension_2_3) {
144    defines += [ "FORM_DIMENSION_2_3" ]
145  }
146  if (bundle_framework_form_dimension_3_3) {
147    defines += [ "FORM_DIMENSION_3_3" ]
148  }
149
150  public_external_deps = [
151    "ability_base:base",
152    "ability_base:want",
153    "json:nlohmann_json_static",
154  ]
155
156  subsystem_name = "bundlemanager"
157  innerapi_tags = [
158    "platformsdk",
159    "sasdk",
160  ]
161  part_name = "bundle_framework"
162}
163