1# Copyright (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved. 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("../../base/config.gni") 16 17ohos_source_set("ipc") { 18 part_name = "${OHOS_PROFILER_PART_NAME}" 19 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 20 sources = [ 21 "src/client_connection.cpp", 22 "src/client_map.cpp", 23 "src/service_entry.cpp", 24 "src/socket_context.cpp", 25 "src/unix_socket_client.cpp", 26 "src/unix_socket_server.cpp", 27 ] 28 include_dirs = [ 29 "include", 30 "../../base/include", 31 ] 32 33 external_deps = [ 34 "bounds_checking_function:libsec_shared", 35 "init:libbegetutil", 36 "protobuf:protobuf_lite_static", 37 ] 38 39 if (current_toolchain != host_toolchain) { 40 defines = [ "HAVE_HILOG" ] 41 external_deps += [ "hilog:libhilog_base" ] 42 } 43 public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] 44} 45 46ohos_executable("protoc_gen_ipc") { 47 sources = [ 48 "src/ipc_generator.cpp", 49 "src/ipc_generator_impl.cpp", 50 "src/main.cpp", 51 ] 52 53 include_dirs = [ "include" ] 54 public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] 55 external_deps = [ 56 "protobuf:protobuf_lite_static", 57 "protobuf:protoc_static_lib(${host_toolchain})", 58 ] 59 install_enable = false 60 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 61 part_name = "${OHOS_PROFILER_PART_NAME}" 62} 63 64ohos_executable("protoencoder_plugin") { 65 sources = [ 66 "src/proto_encoder_plugin.cpp", 67 "src/proto_encoder_plugin_generator.cpp", 68 ] 69 70 include_dirs = [ "include" ] 71 public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] 72 external_deps = [ 73 "protobuf:protobuf_lite_static", 74 "protobuf:protoc_static_lib(${host_toolchain})", 75 ] 76 install_enable = false 77 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 78 part_name = "${OHOS_PROFILER_PART_NAME}" 79} 80