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/storage_service/storage_service_aafwk.gni") 16 17ohos_shared_library("cj_storage_manager_ffi") { 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 defines = [ 29 "STORAGE_LOG_TAG = \"StorageManager\"", 30 "LOG_DOMAIN = 0xD004300", 31 ] 32 33 include_dirs = [ 34 "include", 35 "${storage_service_path}/services/common/include", 36 "${storage_service_path}/services/storage_manager/include/storage", 37 ] 38 39 cflags = [ 40 "-D_FORTIFY_SOURCE=2", 41 "-fstack-protector-strong", 42 ] 43 44 sources = [ 45 "${storage_service_path}/services/storage_manager/cj_impl/src/storage_manager_ffi.cpp", 46 "${storage_service_path}/services/storage_manager/cj_impl/src/storage_manager_impl.cpp", 47 ] 48 49 deps = [ 50 "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy", 51 ] 52 53 external_deps = [ 54 "c_utils:utils", 55 "hilog:libhilog", 56 "ipc:ipc_single", 57 "napi:cj_bind_ffi", 58 "napi:cj_bind_native", 59 "safwk:system_ability_fwk", 60 "samgr:samgr_proxy", 61 ] 62 63 innerapi_tags = [ "platformsdk" ] 64 subsystem_name = "filemanagement" 65 part_name = "storage_service" 66} 67