# Copyright (c) 2022 Huawei Device Co., Ltd. # 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("//arkcompiler/toolchain/toolchain.gni") ohos_source_set("ark_debugger_static") { stack_protector_ret = false deps = [ sdk_libc_secshared_dep ] configs = [ sdk_libc_secshared_config ] defines = [] if (is_mingw || is_mac) { cflags = [ "-std=c++17" ] } include_dirs = [ "$toolchain_root", "$toolchain_root/websocket", ] if (target_os == "android" && !ark_standalone_build) { libs = [ "log" ] } deps += [ "../websocket:websocket_server" ] sources = [ "../common/log_wrapper.cpp", "inspector.cpp", "library_loader.cpp", "ws_server.cpp", ] # hiviewdfx libraries external_deps = hiviewdfx_ext_deps deps += hiviewdfx_deps configs += [ "..:ark_toolchain_common_config" ] subsystem_name = "arkcompiler" part_name = "toolchain" } ohos_shared_library("ark_debugger") { stack_protector_ret = false deps = [ ":ark_debugger_static" ] if (is_mingw) { ldflags = [ "-lwsock32", "-lws2_32", ] } subsystem_name = "arkcompiler" part_name = "toolchain" } ohos_source_set("connectserver_debugger_static") { stack_protector_ret = false deps = [ sdk_libc_secshared_dep ] configs = [ sdk_libc_secshared_config ] defines = [] if (is_mingw || is_mac) { if (is_mingw) { lib_dirs = [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ] libs = [ "wsock32" ] } cflags = [ "-std=c++17" ] } include_dirs = [ "$toolchain_root" ] deps += [ "../websocket:websocket_server" ] sources = [ "../common/log_wrapper.cpp", "connect_inspector.cpp", "connect_server.cpp", ] if (target_os == "ios") { sources -= [ "../common/log_wrapper.cpp" ] } # hiviewdfx libraries external_deps = hiviewdfx_ext_deps deps += hiviewdfx_deps configs += [ "..:ark_toolchain_common_config" ] subsystem_name = "arkcompiler" part_name = "toolchain" } ohos_shared_library("connectserver_debugger") { deps = [ ":connectserver_debugger_static" ] subsystem_name = "arkcompiler" part_name = "toolchain" }