1# Copyright (C) 2021-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 17SUBSYSTEM_DIR = "//foundation/communication/ipc" 18IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native" 19 20config("libipc_single_private_config") { 21 cflags_cc = [ 22 "-DCONFIG_IPC_SINGLE", 23 "-O2", 24 ] 25} 26ohos_shared_library("ipc_single") { 27 sanitize = { 28 integer_overflow = true 29 } 30 version_script = "libipc_single_map" 31 include_dirs = [ 32 "$IPC_CORE_ROOT/c/adapter/access_token/include", 33 "$SUBSYSTEM_DIR/utils/include", 34 ] 35 if (ipc_feature_actv_binder_enabled) { 36 include_dirs += [ "//third_party/json/single_include" ] 37 } 38 sources = [ 39 "$IPC_CORE_ROOT/c/adapter/access_token/src/access_token_adapter.c", 40 "$IPC_CORE_ROOT/src/core/source/ipc_file_descriptor.cpp", 41 "$IPC_CORE_ROOT/src/core/source/ipc_object_proxy.cpp", 42 "$IPC_CORE_ROOT/src/core/source/ipc_object_stub.cpp", 43 "$IPC_CORE_ROOT/src/core/source/ipc_process_skeleton.cpp", 44 "$IPC_CORE_ROOT/src/core/source/ipc_skeleton.cpp", 45 "$IPC_CORE_ROOT/src/core/source/ipc_thread_pool.cpp", 46 "$IPC_CORE_ROOT/src/core/source/ipc_thread_skeleton.cpp", 47 "$IPC_CORE_ROOT/src/core/source/ipc_workthread.cpp", 48 "$IPC_CORE_ROOT/src/core/source/iremote_broker.cpp", 49 "$IPC_CORE_ROOT/src/core/source/iremote_object.cpp", 50 "$IPC_CORE_ROOT/src/core/source/message_option.cpp", 51 "$IPC_CORE_ROOT/src/core/source/message_parcel.cpp", 52 "$IPC_CORE_ROOT/src/core/source/peer_holder.cpp", 53 "$IPC_CORE_ROOT/src/mock/source/binder_connector.cpp", 54 "$IPC_CORE_ROOT/src/mock/source/binder_debug.cpp", 55 "$IPC_CORE_ROOT/src/mock/source/binder_invoker.cpp", 56 "$IPC_CORE_ROOT/src/mock/source/hitrace_invoker.cpp", 57 "$IPC_CORE_ROOT/src/mock/source/invoker_factory.cpp", 58 "$IPC_CORE_ROOT/src/mock/source/invoker_rawdata.cpp", 59 ] 60 61 configs = [ 62 "$SUBSYSTEM_DIR/config:ipc_util_config", 63 ":libipc_single_private_config", 64 ] 65 public_configs = [ "$SUBSYSTEM_DIR/config:ipc_util_config" ] 66 67 deps = [ "$IPC_CORE_ROOT/src/core:ipc_common" ] 68 69 external_deps = [ 70 "c_utils:utils", 71 "ffrt:libffrt", 72 "hilog:libhilog", 73 "hisysevent:libhisysevent", 74 "hitrace:libhitracechain", 75 ] 76 defines = [ "FFRT_IPC_ENABLE" ] 77 78 innerapi_tags = [ 79 "chipsetsdk", 80 "platformsdk", 81 "sasdk", 82 ] 83 install_images = [ 84 system_base_dir, 85 updater_base_dir, 86 ] 87 88 subsystem_name = "communication" 89 part_name = "ipc" 90} 91