# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") import("//foundation/distributeddatamgr/preferences/preferences.gni") base_include = [ "${preferences_base_path}/frameworks/common/include" ] base_sources = [ "${preferences_cj_path}/preferences_ffi.cpp", "${preferences_cj_path}/preferences_impl.cpp", "${preferences_cj_path}/preferences_utils.cpp", ] ohos_shared_library("cj_preferences_ffi") { include_dirs = base_include sources = base_sources sanitize = { boundary_sanitize = true ubsan = true cfi = true cfi_cross_dso = true debug = false } deps = [ "${preferences_base_path}/interfaces/inner_api:native_preferences" ] external_deps = [ "ability_runtime:abilitykit_native", "ability_runtime:napi_base_context", "c_utils:utils", "hilog:libhilog", "napi:ace_napi", "napi:cj_bind_ffi", "napi:cj_bind_native", ] subsystem_name = "distributeddatamgr" part_name = "preferences" innerapi_tags = [ "platformsdk" ] }