# Copyright (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../base/config.gni") ohos_source_set("ipc") { part_name = "${OHOS_PROFILER_PART_NAME}" subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" sources = [ "src/client_connection.cpp", "src/client_map.cpp", "src/service_entry.cpp", "src/socket_context.cpp", "src/unix_socket_client.cpp", "src/unix_socket_server.cpp", ] include_dirs = [ "include", "../../base/include", "//third_party/bounds_checking_function/include", ] external_deps = [ "init:libbegetutil" ] if (current_toolchain != host_toolchain) { defines = [ "HAVE_HILOG" ] external_deps += [ "hilog:libhilog" ] } deps = [ "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", "//third_party/bounds_checking_function:libsec_static", ] public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] } ohos_executable("protoc_gen_ipc") { sources = [ "src/ipc_generator.cpp", "src/ipc_generator_impl.cpp", "src/main.cpp", ] include_dirs = [ "include", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}", ] public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] deps = [ "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc_static_lib(${host_toolchain})", ] install_enable = false subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" } ohos_executable("protoencoder_plugin") { sources = [ "src/proto_encoder_plugin.cpp", "src/proto_encoder_plugin_generator.cpp", ] include_dirs = [ "include", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}", ] public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] deps = [ "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc_static_lib(${host_toolchain})", ] install_enable = false subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" }