• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  hiview_lite_output_option = 1
16  hiview_lite_hilog_lite_level = 1
17  hiview_lite_hilog_lite_level_release = 3
18  hiview_lite_hilog_lite_log_switch = 1
19  hiview_lite_dump_lite_dump_switch = 0
20  hiview_lite_hievent_lite_event_switch = 1
21  hiview_lite_output_module = -1
22  hiview_lite_dir = ""
23  hiview_lite_stack_size = 4096
24  hiview_lite_stack_prio = 24
25  hiview_lite_customize_implementation = false
26  hiview_lite_disable_core_init = false
27}
28
29config("hiview_lite_config") {
30  defines = [ "HIVIEW_FILE_DIR=\"$hiview_lite_dir\"" ]
31  include_dirs = [
32    "//base/hiviewdfx/hiview_lite",
33    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
34    "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
35    "//base/hiviewdfx/hievent_lite/interfaces/native/innerkits",
36    "//commonlibrary/utils_lite/include",
37  ]
38}
39
40static_library("hiview_lite_static") {
41  sources = [
42    "hiview_cache.c",
43    "hiview_config.c",
44    "hiview_file.c",
45    "hiview_service.c",
46    "hiview_util.c",
47  ]
48  defines = [
49    "OUTPUT_OPTION=$hiview_lite_output_option",
50    "HILOG_LITE_SWITCH=$hiview_lite_hilog_lite_log_switch",
51    "DUMP_LITE_SWITCH=$hiview_lite_dump_lite_dump_switch",
52    "HIEVENT_LITE_SWITCH=$hiview_lite_hievent_lite_event_switch",
53    "LOG_OUTPUT_MODULE=$hiview_lite_output_module",
54    "HIVIEW_STACK_SIZE=$hiview_lite_stack_size",
55    "HIVIEW_STACK_PRIO=$hiview_lite_stack_prio",
56  ]
57  if (ohos_build_type == "debug") {
58    defines += [ "OUTPUT_LEVEL=$hiview_lite_hilog_lite_level" ]
59  } else {
60    defines += [ "OUTPUT_LEVEL=$hiview_lite_hilog_lite_level_release" ]
61  }
62  if (hiview_lite_disable_core_init) {
63    defines += [ "DISABLE_HIVIEW_LITE_CORE_INIT" ]
64  }
65  if (board_toolchain_type == "iccarm") {
66    cflags = [
67      "--diag_suppress",
68      "Pe546",
69    ]
70  }
71  public_configs = [ ":hiview_lite_config" ]
72}
73
74group("hiview_lite") {
75  if (hiview_lite_customize_implementation) {
76    public_configs = [ ":hiview_lite_config" ]
77  } else {
78    public_deps = [ ":hiview_lite_static" ]
79  }
80}
81