• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//arkcompiler/toolchain/toolchain.gni")
15
16ohos_source_set("ark_debugger_static") {
17  stack_protector_ret = true
18  defines = []
19
20  if (is_mingw || is_mac) {
21    cflags = [ "-std=c++17" ]
22  }
23
24  include_dirs = [
25    "$toolchain_root",
26    "$toolchain_root/websocket",
27  ]
28
29  if (target_os == "android" && !ark_standalone_build) {
30    libs = [ "log" ]
31  }
32
33  deps = [ "../websocket:websocket_server" ]
34  sources = [
35    "../common/log_wrapper.cpp",
36    "inspector.cpp",
37    "library_loader.cpp",
38    "ws_server.cpp",
39  ]
40
41  # hiviewdfx libraries
42  external_deps = hiviewdfx_ext_deps
43  external_deps += [ "bounds_checking_function:libsec_shared" ]
44  deps += hiviewdfx_deps
45
46  if (is_ohos && is_standard_system && !is_arkui_x) {
47    defines += [ "ENABLE_FFRT_INTERFACES" ]
48    external_deps += [ "ffrt:libffrt" ]
49  }
50
51  configs = [ "..:ark_toolchain_common_config" ]
52  subsystem_name = "arkcompiler"
53  part_name = "toolchain"
54}
55
56ohos_shared_library("ark_debugger") {
57  stack_protector_ret = true
58  deps = [ ":ark_debugger_static" ]
59
60  if (is_mingw) {
61    ldflags = [
62      "-lwsock32",
63      "-lws2_32",
64    ]
65  }
66  if (enable_hilog) {
67    external_deps = [ "hilog:libhilog" ]
68  }
69  subsystem_name = "arkcompiler"
70  part_name = "toolchain"
71  output_name = "ark_inspector"
72}
73
74ohos_source_set("connectserver_debugger_static") {
75  stack_protector_ret = true
76  defines = []
77
78  if (is_mingw || is_mac) {
79    if (is_mingw) {
80      lib_dirs = [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ]
81      libs = [ "wsock32" ]
82    }
83
84    cflags = [ "-std=c++17" ]
85  }
86
87  include_dirs = [
88    "$toolchain_root",
89    "$toolchain_root/websocket",
90  ]
91
92  external_deps = []
93  if (is_arkui_x && target_os == "ios") {
94    external_deps += [ "cJSON:cjson_static" ]
95  } else {
96    external_deps += [ "cJSON:cjson" ]
97  }
98
99  deps = [ "../websocket:websocket_server" ]
100  sources = [
101    "../common/log_wrapper.cpp",
102    "../tooling/base/pt_json.cpp",
103    "connect_inspector.cpp",
104    "connect_server.cpp",
105  ]
106
107  if (target_os == "ios") {
108    sources -= [ "../common/log_wrapper.cpp" ]
109  }
110
111  # hiviewdfx libraries
112  external_deps += hiviewdfx_ext_deps
113  external_deps += [ "bounds_checking_function:libsec_shared" ]
114  deps += hiviewdfx_deps
115  configs = [ "..:ark_toolchain_common_config" ]
116  subsystem_name = "arkcompiler"
117  part_name = "toolchain"
118}
119
120ohos_shared_library("connectserver_debugger") {
121  deps = [ ":connectserver_debugger_static" ]
122  if (enable_hilog) {
123    external_deps = [ "hilog:libhilog" ]
124  }
125  subsystem_name = "arkcompiler"
126  part_name = "toolchain"
127  output_name = "ark_connect_inspector"
128}
129