1# Copyright (c) 2022-2025 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("../../toolchain.gni") 15 16libarkinspector_sources = [ 17 "init.cpp", 18 "connection/endpoint_base.cpp", 19 "connection/event_loop.cpp", 20 "connection/ohos_ws/ohos_ws_server.cpp", 21 "connection/ohos_ws/ohos_ws_server_endpoint.cpp", 22 "connection/server_endpoint_base.cpp", 23 "debugger/breakpoint.cpp", 24 "debugger/breakpoint_storage.cpp", 25 "debugger/conditional_breakpoint.cpp", 26 "debugger/debug_info_cache.cpp", 27 "debugger/debuggable_thread.cpp", 28 "debugger/object_repository.cpp", 29 "debugger/thread_state.cpp", 30 "error.cpp", 31 "evaluation/evaluation_engine.cpp", 32 "inspector.cpp", 33 "inspector_server.cpp", 34 "json_serialization/jrpc_error.cpp", 35 "session_manager.cpp", 36 "source_manager.cpp", 37 "types/custom_url_breakpoint_response.cpp", 38 "types/debugger_call_function_on_request.cpp", 39 "types/debugger_evaluation_request.cpp", 40 "types/exception_details.cpp", 41 "types/location.cpp", 42 "types/object_preview.cpp", 43 "types/profile_result.cpp", 44 "types/remote_object.cpp", 45 "types/scope.cpp", 46 "types/url_breakpoint_request.cpp", 47 "types/url_breakpoint_response.cpp", 48] 49 50config("libarkinspector_config") { 51 cflags_cc = [ 52 "-fexceptions", 53 "-Wno-invalid-offsetof", 54 "-Wno-null-pointer-subtraction", 55 "-Wno-error=unknown-warning-option", 56 ] 57 include_dirs = [ "./" ] 58 include_dirs += [ "../" ] 59 include_dirs += [ "../../" ] 60 defines = [] 61 if (enable_hilog) { 62 defines += [ "ENABLE_HILOG" ] 63 } 64 # required for arkcompiler_toolchain compilation 65 if (is_ohos) { 66 defines += [ "OHOS_PLATFORM" ] 67 } 68} 69 70ohos_static_library("libarkinspector_plus_static") { 71 sources = libarkinspector_sources 72 73 configs = [ 74 "../..:ark_toolchain_common_config", 75 ":libarkinspector_config" 76 ] 77 external_deps = [ 78 "bounds_checking_function:libsec_shared", 79 "runtime_core:libarktscompiler", 80 "runtime_core:arktsdisassembler", 81 "runtime_core:libarktsbase", 82 ] 83 deps = [ 84 "../../websocket:libwebsocket_server", 85 "../hybrid_step:arkhybridstep", 86 ] 87 88 if (is_mingw || is_win) { 89 output_extension = "dll" 90 } else if (is_mac) { 91 output_extension = "dylib" 92 } else { 93 output_extension = "so" 94 } 95 part_name = "toolchain" 96 subsystem_name = "arkcompiler" 97} 98