• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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.
13import("//build/ohos.gni")
14import("//build/ohos_var.gni")
15import("//foundation/filemanagement/storage_service/storage_service_aafwk.gni")
16
17config("public_config") {
18  include_dirs = [ "." ]
19}
20
21config("private_config") {
22  include_dirs = [
23    "${storage_manager_path}/include",
24    "${storage_service_path}/services/storage_daemon/include",
25    "${storage_service_common_path}/include",
26    "${storage_interface_path}/innerkits/storage_manager/native",
27  ]
28}
29
30ohos_shared_library("storage_manager_sa_proxy") {
31  branch_protector_ret = "pac_ret"
32  sanitize = {
33    integer_overflow = true
34    ubsan = true
35    boundary_sanitize = true
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40
41  sources = [
42    "${storage_daemon_path}/ipc/src/storage_daemon_proxy.cpp",
43    "${storage_manager_path}/innerkits_impl/src/bundle_stats.cpp",
44    "${storage_manager_path}/innerkits_impl/src/disk.cpp",
45    "${storage_manager_path}/innerkits_impl/src/storage_manager_proxy.cpp",
46    "${storage_manager_path}/innerkits_impl/src/storage_stats.cpp",
47    "${storage_manager_path}/innerkits_impl/src/volume_core.cpp",
48    "${storage_manager_path}/innerkits_impl/src/volume_external.cpp",
49    "${storage_manager_path}/utils/src/storage_utils.cpp",
50  ]
51
52  defines = [
53    "STORAGE_LOG_TAG = \"StorageManager\"",
54    "LOG_DOMAIN = 0xD004300",
55  ]
56
57  configs = [ ":private_config" ]
58  public_configs = [ ":public_config" ]
59
60  cflags = [
61    "-D_FORTIFY_SOURCE=2",
62    "-fstack-protector-strong",
63  ]
64
65  external_deps = [
66    "c_utils:utils",
67    "hilog:libhilog",
68    "hitrace:hitrace_meter",
69    "ipc:ipc_single",
70  ]
71
72  part_name = "storage_service"
73  innerapi_tags = [ "platformsdk" ]
74  subsystem_name = "filemanagement"
75
76  if (storage_service_media_fuse) {
77    defines += [ "STORAGE_SERVICE_MEDIA_FUSE" ]
78  }
79}
80