# Copyright (c) 2021-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("//ark/js_runtime/js_runtime_config.gni") import("//build/ohos.gni") config("ark_ecma_debugger_config") { configs = [ "//ark/js_runtime:ark_jsruntime_common_config", "//ark/js_runtime:ark_jsruntime_public_config", "$ark_root/runtime:arkruntime_public_config", ] include_dirs = [ ".", "//third_party/boost", "//third_party/cJSON", ] } debugger_sources = [ "agent/debugger_impl.cpp", # "agent/heapprofiler_impl.cpp", # "agent/profiler_impl.cpp", "agent/runtime_impl.cpp", "backend/debugger_executor.cpp", "backend/js_pt_extractor.cpp", "backend/js_pt_hooks.cpp", "base/pt_events.cpp", "base/pt_json.cpp", "base/pt_params.cpp", "base/pt_returns.cpp", "base/pt_script.cpp", "base/pt_types.cpp", "debugger_service.cpp", "dispatcher.cpp", "protocol_handler.cpp", ] source_set("libark_ecma_debugger_set") { sources = debugger_sources public_configs = [ ":ark_ecma_debugger_config" ] deps = [ "$ark_root/libpandabase:libarkbase", "$ark_root/libpandafile:libarkfile", "//third_party/cJSON:cjson_static", ] cflags_cc = [ "-fvisibility=hidden" ] } ohos_shared_library("libark_ecma_debugger") { deps = [ ":libark_ecma_debugger_set", "//ark/js_runtime:libark_jsruntime", ] install_enable = true output_extension = "so" if (!is_standard_system) { relative_install_dir = "ark" } part_name = "ark_js_runtime" subsystem_name = "ark" } source_set("libark_ecma_debugger_test_set") { sources = debugger_sources public_configs = [ ":ark_ecma_debugger_config" ] defines = [ "DEBUGGER_TEST" ] deps = [ "$ark_root/libpandabase:libarkbase", "$ark_root/libpandafile:libarkfile", "//third_party/cJSON:cjson_static", ] } ohos_shared_library("libark_ecma_debugger_test") { deps = [ ":libark_ecma_debugger_test_set", "//ark/js_runtime:libark_jsruntime_test_set", ] if (is_standard_system) { deps += [ "$ark_root/runtime:libarkruntime_static" ] } else { deps += [ "$ark_root/runtime:libarkruntime" ] } if (is_ohos && is_standard_system) { if (build_public_version) { external_deps = [ "bytrace_standard:bytrace_core", "hitrace_native:libhitrace", ] } } public_configs = [ ":ark_ecma_debugger_config" ] install_enable = false output_extension = "so" subsystem_name = "test" }