1# Copyright (c) 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("//foundation/filemanagement/storage_service/storage_service_aafwk.gni") 16 17ohos_shared_library("storagestatistics") { 18 branch_protector_ret = "pac_ret" 19 sanitize = { 20 integer_overflow = true 21 ubsan = true 22 boundary_sanitize = true 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 } 27 28 relative_install_dir = "module/file" 29 subsystem_name = "filemanagement" 30 part_name = "storage_service" 31 32 defines = [ 33 "STORAGE_LOG_TAG = \"StorageManager\"", 34 "LOG_DOMAIN = 0xD004300", 35 ] 36 37 include_dirs = [ 38 "include", 39 "${storage_service_path}/services/storage_manager/include", 40 "${storage_service_path}/interfaces/innerkits/storage_manager/native", 41 "${storage_service_path}/services/common/include", 42 ] 43 44 cflags = [ 45 "-D_FORTIFY_SOURCE=2", 46 "-fstack-protector-strong", 47 ] 48 49 sources = [ 50 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_manager_connect.cpp", 51 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_statistics_n_exporter.cpp", 52 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_statistics_napi.cpp", 53 ] 54 55 deps = [ "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy" ] 56 57 external_deps = [ 58 "access_token:libtokenid_sdk", 59 "c_utils:utils", 60 "file_api:filemgmt_libhilog", 61 "file_api:filemgmt_libn", 62 "hilog:libhilog", 63 "ipc:ipc_single", 64 "napi:ace_napi", 65 "safwk:system_ability_fwk", 66 "samgr:samgr_proxy", 67 ] 68} 69 70ohos_shared_library("volumemanager") { 71 branch_protector_ret = "pac_ret" 72 sanitize = { 73 integer_overflow = true 74 ubsan = true 75 boundary_sanitize = true 76 cfi = true 77 cfi_cross_dso = true 78 debug = false 79 } 80 81 relative_install_dir = "module/file" 82 subsystem_name = "filemanagement" 83 part_name = "storage_service" 84 85 include_dirs = [ 86 "include", 87 "${storage_service_path}/services/storage_manager/include", 88 "${storage_service_path}/interfaces/innerkits/storage_manager/native", 89 "${storage_service_path}/services/common/include", 90 ] 91 92 cflags = [ 93 "-D_FORTIFY_SOURCE=2", 94 "-fstack-protector-strong", 95 ] 96 97 sources = [ 98 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_manager_connect.cpp", 99 "${storage_service_path}/services/storage_manager/kits_impl/src/volumemanager_n_exporter.cpp", 100 "${storage_service_path}/services/storage_manager/kits_impl/src/volumemanager_napi.cpp", 101 ] 102 103 defines = [ 104 "STORAGE_LOG_TAG = \"StorageManager\"", 105 "LOG_DOMAIN = 0xD004300", 106 ] 107 108 deps = [ "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy" ] 109 110 external_deps = [ 111 "access_token:libtokenid_sdk", 112 "c_utils:utils", 113 "file_api:filemgmt_libhilog", 114 "file_api:filemgmt_libn", 115 "hilog:libhilog", 116 "ipc:ipc_single", 117 "napi:ace_napi", 118 "safwk:system_ability_fwk", 119 "samgr:samgr_proxy", 120 ] 121} 122 123group("storage_js") { 124 deps = [ 125 ":storagestatistics", 126 ":volumemanager", 127 ] 128} 129