1# Copyright (c) 2024 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("//build/ohos/ace/ace.gni") 16import("//foundation/distributeddatamgr/preferences/preferences.gni") 17 18base_include = [ "${preferences_base_path}/frameworks/common/include" ] 19 20base_sources = [ 21 "${preferences_cj_path}/preferences_ffi.cpp", 22 "${preferences_cj_path}/preferences_impl.cpp", 23 "${preferences_cj_path}/preferences_utils.cpp", 24] 25 26ohos_shared_library("cj_preferences_ffi") { 27 include_dirs = base_include 28 sources = base_sources 29 sanitize = { 30 boundary_sanitize = true 31 ubsan = true 32 cfi = true 33 cfi_cross_dso = true 34 debug = false 35 } 36 37 deps = [ "${preferences_base_path}/interfaces/inner_api:native_preferences" ] 38 39 external_deps = [ 40 "ability_runtime:abilitykit_native", 41 "ability_runtime:napi_base_context", 42 "c_utils:utils", 43 "hilog:libhilog", 44 "napi:ace_napi", 45 "napi:cj_bind_ffi", 46 "napi:cj_bind_native", 47 ] 48 49 subsystem_name = "distributeddatamgr" 50 part_name = "preferences" 51 innerapi_tags = [ "platformsdk" ] 52} 53