1# Copyright (c) 2021-2022 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("libfaultloggerd") { 18 visibility = [ "*:*" ] 19 20 include_dirs = [ 21 ".", 22 "./include", 23 "//commonlibrary/c_utils/base/include", 24 "//base/startup/init/interfaces/innerkits/include", 25 "$faultloggerd_path/tools/process_dump/", 26 "$faultloggerd_path/common", 27 "$faultloggerd_path/common/dfxlog", 28 "$hilog_lite_include_path", 29 ] 30 31 sources = [ 32 "//base/hiviewdfx/faultloggerd/tools/process_dump/dfx_logger.cpp", 33 "faultloggerd_client.cpp", 34 "faultloggerd_socket.cpp", 35 ] 36 37 deps = [ 38 "$faultloggerd_path/common/dfxlog:static_common_log", 39 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 40 "//base/startup/init/interfaces/innerkits:libbegetutil", 41 ] 42 } 43} else { 44 config("faultloggerd_client_config") { 45 visibility = [ "*:*" ] 46 47 include_dirs = [ 48 "include", 49 "//commonlibrary/c_utils/base/include", 50 "//base/startup/init/interfaces/innerkits/include", 51 "$faultloggerd_path/common", 52 "$faultloggerd_path/common/dfxlog", 53 "$faultloggerd_path/tools/process_dump/", 54 ] 55 } 56 57 ohos_shared_library("libfaultloggerd") { 58 public_configs = [ ":faultloggerd_client_config" ] 59 60 deps = [ "$faultloggerd_path/common/dfxlog:static_common_log" ] 61 sources = [ 62 "//base/hiviewdfx/faultloggerd/tools/process_dump/dfx_logger.cpp", 63 "faultloggerd_client.cpp", 64 "faultloggerd_socket.cpp", 65 ] 66 67 external_deps = [ 68 "c_utils:utils", 69 "hilog_native:libhilog", 70 "init:libbegetutil", 71 ] 72 install_images = [ 73 "system", 74 "updater", 75 ] 76 part_name = "faultloggerd" 77 subsystem_name = "hiviewdfx" 78 } 79} 80