1# Copyright (c) 2023 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/ets_runtime/js_runtime_config.gni") 15 16ohos_executable("profdump") { 17 sources = [ "main.cpp" ] 18 19 deps = [ 20 "$ark_root/libpandabase:libarkbase_static", 21 "$ark_root/libpandafile:libarkfile_static", 22 "$js_root:libark_js_intl_set", 23 "$js_root:libark_jsruntime_set", 24 "$js_root/ecmascript/compiler:libark_mock_stub_set", 25 ] 26 27 public_configs = [ 28 "$js_root:ark_jsruntime_common_config", 29 "$js_root:ark_jsruntime_public_config", 30 ] 31 32 if (is_mingw && !ark_standalone_build) { 33 deps += [ 34 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_windows", 35 ] 36 } 37 38 if (is_mac && !ark_standalone_build) { 39 deps += 40 [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_mac" ] 41 } 42 43 if (target_os == "ios") { 44 deps += [ 45 "$ark_third_party_root/icu/icu4c:static_icui18n", 46 "$ark_third_party_root/icu/icu4c:static_icuuc", 47 ] 48 } else { 49 deps += [ 50 "$ark_third_party_root/icu/icu4c:shared_icui18n", 51 "$ark_third_party_root/icu/icu4c:shared_icuuc", 52 ] 53 } 54 55 # hiviewdfx libraries 56 if (is_ohos && is_standard_system) { 57 if (enable_dump_in_faultlog || enable_bytrace || enable_hitrace || 58 enable_hilog) { 59 external_deps = [] 60 } 61 if (enable_dump_in_faultlog) { 62 external_deps += [ "faultloggerd:libfaultloggerd" ] 63 } 64 if (enable_bytrace) { 65 external_deps += [ "hitrace_native:hitrace_meter" ] 66 } 67 if (enable_hitrace) { 68 external_deps += [ "hitrace_native:libhitracechain" ] 69 } 70 if (enable_hilog) { 71 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 72 } 73 } 74 75 install_enable = true 76 77 part_name = "ets_runtime" 78 subsystem_name = "arkcompiler" 79} 80