• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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("//build/ohos.gni")
15import("../../eventhandler.gni")
16import("inner_api_sources.gni")
17
18config("libeventhandler_config") {
19  include_dirs = [
20    "${inner_api_path}",
21    "include",
22  ]
23}
24
25config("public_libeventhandler_config") {
26  include_dirs = [ "${inner_api_path}" ]
27}
28
29ohos_shared_library("libeventhandler") {
30  sanitize = {
31    integer_overflow = true
32    ubsan = true
33    boundary_sanitize = true
34    cfi = true
35    cfi_cross_dso = true
36    debug = false
37    blocklist = "./handler_blocklist.txt"
38  }
39  branch_protector_ret = "pac_ret"
40
41  all_dependent_configs = [ ":libeventhandler_config" ]
42  cflags_cc = []
43  sources = inner_api_sources
44
45  public_configs = [
46    ":public_libeventhandler_config",
47    ":libeventhandler_config",
48  ]
49
50  external_deps = [
51    "c_utils:utils",
52    "hilog:libhilog",
53    "hitrace:libhitracechain",
54  ]
55
56  defines = []
57  if (resource_schedule_usage) {
58    external_deps += [ "ipc:ipc_single" ]
59    external_deps += [ "resource_schedule_service:ressched_client" ]
60    defines += [ "RES_SCHED_ENABLE" ]
61  }
62
63  if (has_hichecker_native_part) {
64    cflags_cc += [ "-DHAS_HICHECKER_NATIVE_PART" ]
65    external_deps += [ "hichecker:libhichecker" ]
66  }
67
68  if (eh_hitrace_usage) {
69    cflags_cc += [ "-DEH_HITRACE_METER_ENABLE" ]
70  }
71
72  if (eventhandler_ffrt_usage) {
73    cflags_cc += [ "-DFFRT_USAGE_ENABLE" ]
74    external_deps += [ "ffrt:libffrt" ]
75  }
76
77  install_images = [
78    system_base_dir,
79    updater_base_dir,
80  ]
81  subsystem_name = "notification"
82  innerapi_tags = [
83    "platformsdk",
84    "chipsetsdk_indirect",
85    "sasdk",
86  ]
87  part_name = "eventhandler"
88}
89