• 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 = []
42
43  external_deps = [
44    "ability_base:want",
45    "ability_runtime:ability_context_native",
46    "ability_runtime:abilitykit_native",
47    "ability_runtime:app_context",
48    "ability_runtime:appkit_native",
49    "ability_runtime:extensionkit_native",
50    "ability_runtime:napi_common",
51    "ability_runtime:runtime",
52    "access_token:libaccesstoken_sdk",
53    "bundle_framework:appexecfwk_core",
54    "c_utils:utils",
55    "hilog:libhilog",
56    "hitrace:hitrace_meter",
57    "ipc:ipc_core",
58    "napi:ace_napi",
59    "samgr:samgr_proxy",
60  ]
61
62  cflags_cc = []
63
64  use_exceptions = true
65  relative_install_dir = "extensionability"
66  part_name = "dmsfwk"
67  subsystem_name = "ability"
68}
69
70ohos_shared_library("distributed_extension_sa") {
71  branch_protector_ret = "pac_ret"
72
73  sanitize = {
74    integer_overflow = true
75    ubsan = true
76    boundary_sanitize = true
77    cfi = true
78    cfi_cross_dso = true
79    debug = false
80  }
81
82  sources = [
83    "src/ipc/distributed_extension_proxy.cpp"
84  ]
85
86  include_dirs = [
87    "include",
88    "include/ipc",
89    "${dms_path}/common/include",
90  ]
91
92  deps = []
93
94  external_deps = [
95    "ability_base:want",
96    "ability_runtime:ability_connect_callback_stub",
97    "ability_runtime:ability_manager",
98    "access_token:libaccesstoken_sdk",
99    "access_token:libtokenid_sdk",
100    "bundle_framework:appexecfwk_base",
101    "bundle_framework:appexecfwk_core",
102    "c_utils:utils",
103    "common_event_service:cesfwk_innerkits",
104    "hilog:libhilog",
105    "hisysevent:libhisysevent",
106    "hitrace:hitrace_meter",
107    "init:libbegetutil",
108    "ipc:ipc_core",
109    "safwk:system_ability_fwk",
110    "samgr:samgr_proxy",
111    "storage_service:storage_manager_sa_proxy",
112  ]
113
114  cflags_cc = [
115    #"-fdata-sections",
116    #"-ffunction-sections",
117    #"-fno-unwind-tables",
118    #"-fno-asynchronous-unwind-tables",
119    #"-Os",
120  ]
121
122  use_exceptions = true
123  part_name = "dmsfwk"
124  subsystem_name = "ability"
125}