• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("../../base/config.gni")
16
17ohos_source_set("ipc") {
18  part_name = "profiler"
19  sources = [
20    "src/client_connection.cpp",
21    "src/client_map.cpp",
22    "src/service_entry.cpp",
23    "src/socket_context.cpp",
24    "src/unix_socket_client.cpp",
25    "src/unix_socket_server.cpp",
26  ]
27  include_dirs = [
28    "include",
29    "../../base/include",
30    "//third_party/bounds_checking_function/include",
31  ]
32
33  external_deps = [ "init:libbegetutil" ]
34
35  if (current_toolchain != host_toolchain) {
36    defines = [ "HAVE_HILOG" ]
37    if (build_l2) {
38      external_deps += [ "shared_library:libhilog" ]
39    } else {
40      external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
41    }
42  }
43  deps = [
44    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf",
45    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
46    "//third_party/bounds_checking_function:libsec_static",
47  ]
48  public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
49}
50
51ohos_executable("protoc_gen_ipc") {
52  sources = [
53    "src/ipc_generator.cpp",
54    "src/ipc_generator_impl.cpp",
55    "src/main.cpp",
56  ]
57
58  include_dirs = [
59    "include",
60    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}",
61  ]
62  public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
63  deps = [
64    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf",
65    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
66    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc_lib(${host_toolchain})",
67  ]
68  install_enable = false
69  subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
70  part_name = "${OHOS_PROFILER_PART_NAME}"
71}
72