1# Copyright (c) 2021-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("//base/hiviewdfx/faultloggerd/faultloggerd.gni") 15 16if (defined(ohos_lite)) { 17 shared_library("libasync_stack") { 18 include_dirs = [ 19 "include", 20 ".", 21 "$faultloggerd_interfaces_path/common", 22 "$faultloggerd_common_path/dfxutil", 23 ] 24 sources = [ 25 "async_stack.cpp", 26 "fp_unwinder.cpp", 27 "unique_stack_table.cpp", 28 ] 29 defines = [ 30 "is_ohos=${is_ohos}", 31 "is_ohos_lite", 32 ] 33 deps = [ 34 "$faultloggerd_common_path/dfxutil:dfx_util", 35 "$faultloggerd_path/common/cutil:dfx_cutil", 36 "$faultloggerd_path/common/dfxlog:dfx_hilog", 37 ] 38 39 external_deps = [ "bounds_checking_function:libsec_static" ] 40 } 41} else { 42 config("async_stack_config") { 43 visibility = [ "*:*" ] 44 45 include_dirs = [ 46 "include", 47 ".", 48 "$faultloggerd_interfaces_path/common", 49 "$faultloggerd_common_path/dfxutil", 50 ] 51 } 52 53 ohos_shared_library("libasync_stack") { 54 public_configs = [ ":async_stack_config" ] 55 defines = [ 56 "is_ohos=${is_ohos}", 57 "ENABLE_PARAMETER", 58 ] 59 60 sources = [ 61 "async_stack.cpp", 62 "fp_unwinder.cpp", 63 "unique_stack_table.cpp", 64 ] 65 deps = [ 66 "$faultloggerd_common_path/dfxlog:dfx_hilog", 67 "$faultloggerd_common_path/dfxutil:dfx_util", 68 ] 69 external_deps = [ 70 "c_utils:utils", 71 "hilog:libhilog", 72 "init:libbegetutil", 73 ] 74 version_script = "libasync_stack.map" 75 install_images = [ 76 "system", 77 "updater", 78 ] 79 80 innerapi_tags = [ 81 "chipsetsdk_indirect", 82 "platformsdk_indirect", 83 ] 84 85 part_name = "faultloggerd" 86 subsystem_name = "hiviewdfx" 87 } 88} 89