• 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_meter_ani") {
19  sources = [ "./src/hitracemeter_ani.cpp" ]
20  deps = [ "$hitrace_interfaces_path/native/innerkits:hitrace_meter" ]
21
22  external_deps = [
23    "bounds_checking_function:libsec_shared",
24    "runtime_core:ani",
25  ]
26
27  if (defined(ohos_lite)) {
28    external_deps += [ "hilog_lite:hilog_lite" ]
29  } else {
30    external_deps += [ "hilog:libhilog" ]
31  }
32
33  subsystem_name = "hiviewdfx"
34  part_name = "hitrace"
35  output_extension = "so"
36}
37
38generate_static_abc("hitrace_meter") {
39  base_url = "./ets"
40  files = [ "./ets/@ohos.hiTraceMeter.ets" ]
41  is_boot_abc = "True"
42  device_dst_file = "/system/framework/hitrace_meter.abc"
43}
44
45ohos_prebuilt_etc("hitrace_meter_etc") {
46  source = "$target_out_dir/hitrace_meter.abc"
47  module_install_dir = "framework"
48  subsystem_name = "hiviewdfx"
49  part_name = "hitrace"
50  deps = [ ":hitrace_meter" ]
51}
52