• 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/hitrace/hitrace.gni")
15import("//build/config/components/ets_frontend/ets2abc_config.gni")
16import("//build/ohos.gni")
17
18ohos_shared_library("hitrace_chain_ani") {
19  include_dirs = [
20    "$hitrace_interfaces_path/ets/ani/hitracechain/include/",
21    "$hitrace_interfaces_path/native/innerkits/include/hitace/",
22  ]
23  sources = [
24    "$hitrace_interfaces_path/ets/ani/hitracechain//src/hitrace_chain_ani_util.cpp",
25    "$hitrace_interfaces_path/ets/ani/hitracechain/src/hitrace_chain_ani.cpp",
26  ]
27
28  deps = [ "$hitrace_interfaces_path/native/innerkits:libhitracechain" ]
29
30  external_deps = [
31    "bounds_checking_function:libsec_shared",
32    "hilog:libhilog",
33    "runtime_core:ani",
34  ]
35  if (defined(ohos_lite)) {
36    external_deps += [ "hilog_lite:hilog_lite" ]
37  } else {
38    external_deps += [ "hilog:libhilog" ]
39  }
40
41  subsystem_name = "hiviewdfx"
42  part_name = "hitrace"
43  output_extension = "so"
44}
45
46generate_static_abc("hitrace_chain") {
47  base_url = "./ets"
48  files = [ "./ets/@ohos.hiTraceChain.ets" ]
49  is_boot_abc = "True"
50  device_dst_file = "/system/framework/hitrace_chain.abc"
51}
52
53ohos_prebuilt_etc("hitrace_chain_etc") {
54  source = "$target_out_dir/hitrace_chain.abc"
55  module_install_dir = "framework"
56  subsystem_name = "hiviewdfx"
57  part_name = "hitrace"
58  deps = [ ":hitrace_chain" ]
59}
60