106f6ba60Sopenharmony_ci# Copyright (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved. 206f6ba60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 306f6ba60Sopenharmony_ci# you may not use this file except in compliance with the License. 406f6ba60Sopenharmony_ci# You may obtain a copy of the License at 506f6ba60Sopenharmony_ci# 606f6ba60Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 706f6ba60Sopenharmony_ci# 806f6ba60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 906f6ba60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1006f6ba60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1106f6ba60Sopenharmony_ci# See the License for the specific language governing permissions and 1206f6ba60Sopenharmony_ci# limitations under the License. 1306f6ba60Sopenharmony_ci 1406f6ba60Sopenharmony_ciimport("//build/ohos.gni") 1506f6ba60Sopenharmony_ciimport("../../base/config.gni") 1606f6ba60Sopenharmony_ci 1706f6ba60Sopenharmony_ciohos_source_set("ipc") { 1806f6ba60Sopenharmony_ci part_name = "${OHOS_PROFILER_PART_NAME}" 1906f6ba60Sopenharmony_ci subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 2006f6ba60Sopenharmony_ci sources = [ 2106f6ba60Sopenharmony_ci "src/client_connection.cpp", 2206f6ba60Sopenharmony_ci "src/client_map.cpp", 2306f6ba60Sopenharmony_ci "src/service_entry.cpp", 2406f6ba60Sopenharmony_ci "src/socket_context.cpp", 2506f6ba60Sopenharmony_ci "src/unix_socket_client.cpp", 2606f6ba60Sopenharmony_ci "src/unix_socket_server.cpp", 2706f6ba60Sopenharmony_ci ] 2806f6ba60Sopenharmony_ci include_dirs = [ 2906f6ba60Sopenharmony_ci "include", 3006f6ba60Sopenharmony_ci "../../base/include", 3106f6ba60Sopenharmony_ci ] 3206f6ba60Sopenharmony_ci 3306f6ba60Sopenharmony_ci external_deps = [ 3406f6ba60Sopenharmony_ci "bounds_checking_function:libsec_shared", 3506f6ba60Sopenharmony_ci "init:libbegetutil", 3606f6ba60Sopenharmony_ci "protobuf:protobuf_lite_static", 3706f6ba60Sopenharmony_ci "protobuf:protobuf_static", 3806f6ba60Sopenharmony_ci ] 3906f6ba60Sopenharmony_ci 4006f6ba60Sopenharmony_ci if (current_toolchain != host_toolchain) { 4106f6ba60Sopenharmony_ci defines = [ "HAVE_HILOG" ] 4206f6ba60Sopenharmony_ci external_deps += [ "hilog:libhilog_base" ] 4306f6ba60Sopenharmony_ci } 4406f6ba60Sopenharmony_ci public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] 4506f6ba60Sopenharmony_ci} 4606f6ba60Sopenharmony_ci 4706f6ba60Sopenharmony_ciohos_executable("protoc_gen_ipc") { 4806f6ba60Sopenharmony_ci sources = [ 4906f6ba60Sopenharmony_ci "src/ipc_generator.cpp", 5006f6ba60Sopenharmony_ci "src/ipc_generator_impl.cpp", 5106f6ba60Sopenharmony_ci "src/main.cpp", 5206f6ba60Sopenharmony_ci ] 5306f6ba60Sopenharmony_ci 5406f6ba60Sopenharmony_ci include_dirs = [ "include" ] 5506f6ba60Sopenharmony_ci public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] 5606f6ba60Sopenharmony_ci external_deps = [ 5706f6ba60Sopenharmony_ci "protobuf:protobuf_lite_static", 5806f6ba60Sopenharmony_ci "protobuf:protobuf_static", 5906f6ba60Sopenharmony_ci "protobuf:protoc_static_lib(${host_toolchain})", 6006f6ba60Sopenharmony_ci ] 6106f6ba60Sopenharmony_ci install_enable = false 6206f6ba60Sopenharmony_ci subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 6306f6ba60Sopenharmony_ci part_name = "${OHOS_PROFILER_PART_NAME}" 6406f6ba60Sopenharmony_ci} 6506f6ba60Sopenharmony_ci 6606f6ba60Sopenharmony_ciohos_executable("protoencoder_plugin") { 6706f6ba60Sopenharmony_ci sources = [ 6806f6ba60Sopenharmony_ci "src/proto_encoder_plugin.cpp", 6906f6ba60Sopenharmony_ci "src/proto_encoder_plugin_generator.cpp", 7006f6ba60Sopenharmony_ci ] 7106f6ba60Sopenharmony_ci 7206f6ba60Sopenharmony_ci include_dirs = [ "include" ] 7306f6ba60Sopenharmony_ci public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ] 7406f6ba60Sopenharmony_ci external_deps = [ 7506f6ba60Sopenharmony_ci "protobuf:protobuf_lite_static", 7606f6ba60Sopenharmony_ci "protobuf:protobuf_static", 7706f6ba60Sopenharmony_ci "protobuf:protoc_static_lib(${host_toolchain})", 7806f6ba60Sopenharmony_ci ] 7906f6ba60Sopenharmony_ci install_enable = false 8006f6ba60Sopenharmony_ci subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 8106f6ba60Sopenharmony_ci part_name = "${OHOS_PROFILER_PART_NAME}" 8206f6ba60Sopenharmony_ci} 83