• 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")
15
16config("ffi_common_deps_config") {
17  include_dirs = [ "include" ]
18}
19
20if (support_jsapi) {
21  ohos_shared_library("cj_ipc_ffi") {
22    sanitize = {
23      integer_overflow = true
24    }
25
26    if (!defined(defines)) {
27      defines = []
28    }
29    include_dirs = [
30      "include",
31      "../../../utils/include",
32      "../../../ipc/native/src/napi_common/include",
33      "../../../interfaces/innerkits/ipc_napi_common/include",
34    ]
35    public_configs = [ ":ffi_common_deps_config" ]
36
37    deps = [
38      "../../../interfaces/innerkits/ipc_core:ipc_core",
39      "../../../interfaces/innerkits/ipc_napi_common:ipc_napi",
40    ]
41    external_deps = [
42      "c_utils:utils",
43      "hilog:libhilog",
44      "hitrace:hitrace_meter",
45      "libuv:uv",
46      "napi:ace_napi",
47      "napi:cj_bind_ffi",
48      "napi:cj_bind_native",
49    ]
50    sources = [
51      "src/ashmem_impl.cpp",
52      "src/ipc_ffi.cpp",
53      "src/ipc_skeleton_imp.cpp",
54      "src/ipc_utils_ffi.cpp",
55      "src/message_sequence_impl.cpp",
56      "src/remote_object_holder_impl.cpp",
57      "src/remote_object_impl.cpp",
58      "src/remote_proxy_impl.cpp",
59    ]
60
61    innerapi_tags = [ "platformsdk" ]
62
63    subsystem_name = "communication"
64    part_name = "ipc"
65  }
66} else {
67  ohos_shared_library("cj_ipc_ffi") {
68  }
69}
70