• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/hiview/hiview.gni")
15import("//build/config/components/ets_frontend/ets2abc_config.gni")
16import("//build/ohos.gni")
17
18ohos_shared_library("loglibrary_ani") {
19  include_dirs = [
20    "./include/",
21    "$hiview_base/include",
22    "$hiview_interfaces/inner_api/unified_collection",
23    "$hiview_interfaces/js/napi/include",
24  ]
25
26  sources = [
27    "$hiview_interfaces/js/napi/src/hiview_service_agent.cpp",
28    "./src/loglibrary_ani.cpp",
29    "./src/loglibrary_ani_util.cpp",
30  ]
31
32  sanitize = {
33    cfi = true
34    cfi_cross_dso = true
35    cfi_vcall_icall_only = true
36    debug = false
37  }
38
39  deps = [
40    "$hiview_adapter/service/client:hiview_service_proxy",
41    "$hiview_base:hiviewbase",
42  ]
43
44  external_deps = [
45    "ability_runtime:app_context",
46    "access_token:libtokenid_sdk",
47    "bundle_framework:appexecfwk_core",
48    "hilog:libhilog",
49    "runtime_core:ani",
50    "samgr:samgr_proxy",
51    "storage_service:storage_manager_acl",
52  ]
53
54  subsystem_name = "hiviewdfx"
55  part_name = "hiview"
56  output_extension = "so"
57}
58
59generate_static_abc("loglibrary") {
60  base_url = "./ets"
61  files = [ "./ets/@ohos.logLibrary.ets" ]
62  is_boot_abc = "True"
63  device_dst_file = "/system/framework/loglibrary.abc"
64}
65
66ohos_prebuilt_etc("loglibrary_etc") {
67  source = "$target_out_dir/loglibrary.abc"
68  module_install_dir = "framework"
69  subsystem_name = "hiviewdfx"
70  part_name = "hiview"
71  deps = [ ":loglibrary" ]
72}
73