• 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("//build/ohos.gni")
15import("//foundation/filemanagement/file_api/file_api.gni")
16
17group("group_hyperaio") {
18  deps = [ ]
19  if (file_api_feature_hyperaio) {
20    deps += [ ":HyperAio" ]
21  }
22}
23
24config("hyperaio_config") {
25  visibility = [ ":*" ]
26  include_dirs = [ "include" ]
27}
28
29ohos_shared_library("HyperAio") {
30  if (!use_mingw_win && !use_mac) {
31    cflags = [
32      "-fdata-sections",
33      "-ffunction-sections",
34      "-Oz",
35    ]
36    cflags_cc = [
37      "-fvisibility-inlines-hidden",
38      "-Oz",
39    ]
40    branch_protector_ret = "pac_ret"
41    sanitize = {
42      integer_overflow = true
43      ubsan = true
44      boundary_sanitize = true
45      cfi = true
46      cfi_cross_dso = true
47      debug = false
48    }
49  }
50  sources = [
51    "src/hyperaio.cpp",
52    "src/hyperaio_trace.cpp"
53  ]
54  public_configs = [ ":hyperaio_config" ]
55  deps = [ ]
56  external_deps = [
57    "c_utils:utils",
58    "hilog:libhilog",
59    "ipc:ipc_core",
60    "access_token:libaccesstoken_sdk",
61    "hitrace:hitrace_meter",
62  ]
63  if (file_api_feature_hyperaio) {
64    external_deps += [ "liburing:liburing" ]
65  }
66  install_images = [ "system" ]
67  part_name = "file_api"
68  subsystem_name = "filemanagement"
69  if (file_api_feature_hyperaio) {
70    defines = [ "HYPERAIO_USE_LIBURING" ]
71  }
72}