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 = false 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 = false 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 innerapi_tags = [ "platformsdk" ] 70 subsystem_name = "arkcompiler" 71 part_name = "toolchain" 72 output_name = "ark_inspector" 73} 74 75ohos_source_set("connectserver_debugger_static") { 76 stack_protector_ret = false 77 defines = [] 78 79 if (is_mingw || is_mac) { 80 if (is_mingw) { 81 lib_dirs = [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ] 82 libs = [ "wsock32" ] 83 } 84 85 cflags = [ "-std=c++17" ] 86 } 87 88 include_dirs = [ 89 "$toolchain_root", 90 "$toolchain_root/websocket", 91 ] 92 93 deps = [ "../websocket:websocket_server" ] 94 sources = [ 95 "../common/log_wrapper.cpp", 96 "connect_inspector.cpp", 97 "connect_server.cpp", 98 ] 99 100 if (target_os == "ios") { 101 sources -= [ "../common/log_wrapper.cpp" ] 102 } 103 104 # hiviewdfx libraries 105 external_deps = hiviewdfx_ext_deps 106 external_deps += [ "bounds_checking_function:libsec_shared" ] 107 deps += hiviewdfx_deps 108 109 configs = [ "..:ark_toolchain_common_config" ] 110 subsystem_name = "arkcompiler" 111 part_name = "toolchain" 112} 113 114ohos_shared_library("connectserver_debugger") { 115 deps = [ ":connectserver_debugger_static" ] 116 if (enable_hilog) { 117 external_deps = [ "hilog:libhilog" ] 118 } 119 innerapi_tags = [ "platformsdk" ] 120 subsystem_name = "arkcompiler" 121 part_name = "toolchain" 122 output_name = "ark_connect_inspector" 123} 124