• 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/ohos.gni")
15import("//foundation/ability/dmsfwk/dmsfwk.gni")
16
17ohos_shared_library("distributed_extension_ability_native") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    cfi = true
21    cfi_cross_dso = true
22    debug = false
23  }
24
25  sources = [
26    "src/distributed_extension.cpp",
27    "src/distributed_extension_context.cpp",
28    "src/distributed_extension_context_js.cpp",
29    "src/distributed_extension_js.cpp",
30    "src/distributed_extension_loader.cpp",
31    "src/distributed_extension_service.cpp",
32    "src/ipc/distributed_extension_stub.cpp",
33  ]
34
35  include_dirs = [
36    "include",
37    "include/ipc",
38    "${dms_path}/common/include",
39  ]
40
41  deps = [ "${dms_path}/common:distributed_sched_utils" ]
42
43  external_deps = [
44    "ability_base:configuration",
45    "ability_base:want",
46    "ability_runtime:ability_context_native",
47    "ability_runtime:ability_manager",
48    "ability_runtime:ability_start_options",
49    "ability_runtime:abilitykit_native",
50    "ability_runtime:abilitykit_utils",
51    "ability_runtime:app_context",
52    "ability_runtime:extensionkit_native",
53    "ability_runtime:napi_common",
54    "ability_runtime:runtime",
55    "access_token:libaccesstoken_sdk",
56    "bundle_framework:appexecfwk_core",
57    "cJSON:cjson",
58    "c_utils:utils",
59    "eventhandler:libeventhandler",
60    "hilog:libhilog",
61    "hitrace:hitrace_meter",
62    "i18n:intl_util",
63    "ipc:ipc_core",
64    "ipc:ipc_napi",
65    "ipc:ipc_single",
66    "napi:ace_napi",
67    "samgr:samgr_proxy",
68  ]
69
70  cflags_cc = []
71
72  use_exceptions = true
73  relative_install_dir = "extensionability"
74  part_name = "dmsfwk"
75  subsystem_name = "ability"
76}
77
78ohos_shared_library("distributed_extension_sa") {
79  branch_protector_ret = "pac_ret"
80
81  sanitize = {
82    integer_overflow = true
83    ubsan = true
84    boundary_sanitize = true
85    cfi = true
86    cfi_cross_dso = true
87    debug = false
88  }
89
90  sources = [ "src/ipc/distributed_extension_proxy.cpp" ]
91
92  include_dirs = [
93    "include",
94    "include/ipc",
95    "${dms_path}/common/include",
96  ]
97
98  deps = []
99
100  external_deps = [
101    "ability_base:want",
102    "ability_runtime:ability_connect_callback_stub",
103    "ability_runtime:ability_manager",
104    "access_token:libaccesstoken_sdk",
105    "access_token:libtokenid_sdk",
106    "bundle_framework:appexecfwk_base",
107    "bundle_framework:appexecfwk_core",
108    "c_utils:utils",
109    "common_event_service:cesfwk_innerkits",
110    "hilog:libhilog",
111    "hisysevent:libhisysevent",
112    "hitrace:hitrace_meter",
113    "init:libbegetutil",
114    "ipc:ipc_core",
115    "safwk:system_ability_fwk",
116    "samgr:samgr_proxy",
117    "storage_service:storage_manager_sa_proxy",
118  ]
119
120  cflags_cc = [
121    #"-fdata-sections",
122    #"-ffunction-sections",
123    #"-fno-unwind-tables",
124    #"-fno-asynchronous-unwind-tables",
125    #"-Os",
126  ]
127
128  use_exceptions = true
129  part_name = "dmsfwk"
130  subsystem_name = "ability"
131}
132