1# Copyright (c) 2020 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 14declare_args() { 15 ohos_hiviewdfx_hiview_lite_output_option = 1 16 ohos_hiviewdfx_hilog_lite_level = 1 17 ohos_hiviewdfx_hilog_lite_level_release = 3 18 ohos_hiviewdfx_hilog_lite_log_switch = 1 19 ohos_hiviewdfx_dump_lite_dump_switch = 0 20 ohos_hiviewdfx_hievent_lite_event_switch = 1 21 ohos_hiviewdfx_hiview_lite_output_module = -1 22 ohos_hiviewdfx_hiview_lite_dir = "" 23} 24 25config("hiview_lite_config") { 26 defines = [ "HIVIEW_FILE_DIR = \"$ohos_hiviewdfx_hiview_lite_dir\"" ] 27 include_dirs = [ 28 "//base/hiviewdfx/hiview_lite", 29 "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", 30 "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", 31 ] 32} 33 34static_library("hiview_lite") { 35 sources = [ 36 "hiview_cache.c", 37 "hiview_config.c", 38 "hiview_file.c", 39 "hiview_service.c", 40 "hiview_util.c", 41 ] 42 cflags = [ "-Wall" ] 43 defines = [ 44 "OUTPUT_OPTION = $ohos_hiviewdfx_hiview_lite_output_option", 45 "HILOG_LITE_SWITCH = $ohos_hiviewdfx_hilog_lite_log_switch", 46 "DUMP_LITE_SWITCH = $ohos_hiviewdfx_dump_lite_dump_switch", 47 "HIEVENT_LITE_SWITCH = $ohos_hiviewdfx_hievent_lite_event_switch", 48 "LOG_OUTPUT_MODULE = $ohos_hiviewdfx_hiview_lite_output_module", 49 ] 50 if (ohos_build_type == "debug") { 51 defines += [ "OUTPUT_LEVEL = $ohos_hiviewdfx_hilog_lite_level" ] 52 } else { 53 defines += [ "OUTPUT_LEVEL = $ohos_hiviewdfx_hilog_lite_level_release" ] 54 } 55 public_configs = [ ":hiview_lite_config" ] 56} 57