• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("../../../config.gni")
16
17if (support_jsapi) {
18  config("napi_common_deps_config") {
19    include_dirs = [
20      "include",
21      "../../../ipc/native/src/napi_common/include",
22    ]
23  }
24
25  ohos_shared_library("ipc_napi") {
26    sanitize = {
27      integer_overflow = true
28    }
29    branch_protector_ret = "pac_ret"
30    include_dirs = [
31      "include",
32      "../../../utils/include",
33      "../../../ipc/native/src/napi_common/include",
34    ]
35    all_dependent_configs = [ ":napi_common_deps_config" ]
36    public_configs = [ ":napi_common_deps_config" ]
37
38    sources = [
39      "../../../ipc/native/src/napi_common/source/napi_ashmem.cpp",
40      "../../../ipc/native/src/napi_common/source/napi_message_parcel_read.cpp",
41      "../../../ipc/native/src/napi_common/source/napi_message_parcel_write.cpp",
42      "../../../ipc/native/src/napi_common/source/napi_message_sequence_read.cpp",
43      "../../../ipc/native/src/napi_common/source/napi_message_sequence_write.cpp",
44      "../../../ipc/native/src/napi_common/source/napi_process_skeleton.cpp",
45      "../../../ipc/native/src/napi_common/source/napi_remote_object.cpp",
46      "../../../ipc/native/src/napi_common/source/napi_remote_object_holder.cpp",
47      "../../../ipc/native/src/napi_common/source/napi_remote_proxy_holder.cpp",
48      "../../../ipc/native/src/napi_common/source/napi_rpc_error.cpp",
49    ]
50
51    deps = [ "../../../interfaces/innerkits/ipc_core:ipc_core" ]
52
53    external_deps = [
54      "c_utils:utils",
55      "hilog:libhilog",
56      "hitrace:hitrace_meter",
57      "libuv:uv",
58      "napi:ace_napi",
59    ]
60
61    defines = []
62    if (resourceschedule_ffrt_support) {
63      external_deps += [ "ffrt:libffrt" ]
64      defines += [ "FFRT_SUPPORT" ]
65    }
66
67    if (resourceschedule_ffrt_support) {
68      external_deps += [ "faultloggerd:libbacktrace_local" ]
69      defines += [ "HIVIEWDFX_BACKTRACE_SUPPORT" ]
70    }
71
72    install_images = [ system_base_dir ]
73    subsystem_name = "communication"
74    innerapi_tags = [ "platformsdk" ]
75    part_name = "ipc"
76  }
77} else {
78  ohos_shared_library("ipc_napi") {
79  }
80}
81