# Copyright (c) 2023 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") config("gaussdb_rd_config") { visibility = [ ":*" ] include_dirs = [ "src/common/include", "src/executor/include", "src/executor/document", "src/oh_adapter/include", "src/oh_adapter/src", "src/interface/include", ] defines = [ "SQLITE_ENABLE_SNAPSHOT", "SQLITE_HAS_CODEC", "SQLITE_ENABLE_JSON1", "USING_HILOG_LOGGER", "USE_SQLITE_SYMBOLS", "SQLITE_ENABLE_DROPTABLE_CALLBACK", ] if (is_debug) { defines += [ "TRACE_SQLITE_EXECUTE" ] } } config("gaussdb_rd_public_config") { visibility = [ "*:*" ] include_dirs = [ "include", "include/grd_base", "include/grd_document", "include/grd_kv", ] } group("build_module") { deps = [ ":gaussdb_rd" ] } ohos_static_library("gaussdb_rd") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "src/common/src/collection_option.cpp", "src/common/src/db_config.cpp", "src/common/src/grd_api_manager.cpp", "src/common/src/json_common.cpp", "src/common/src/os_api.cpp", "src/common/src/rd_log_print.cpp", "src/executor/base/grd_db_api.cpp", "src/executor/base/grd_db_api_inner.cpp", "src/executor/document/check_common.cpp", "src/executor/document/grd_document_api.cpp", "src/executor/document/grd_document_api_inner.cpp", "src/executor/document/grd_resultset_api.cpp", "src/executor/document/grd_resultset_api_inner.cpp", "src/executor/kv/grd_kv_api.cpp", "src/executor/kv/grd_kv_api_inner.cpp", "src/interface/src/collection.cpp", "src/interface/src/doc_errno.cpp", "src/interface/src/document_key.cpp", "src/interface/src/document_store.cpp", "src/interface/src/document_store_manager.cpp", "src/interface/src/projection_tree.cpp", "src/interface/src/result_set.cpp", "src/interface/src/result_set_common.cpp", "src/oh_adapter/src/kv_store_manager.cpp", "src/oh_adapter/src/rd_json_object.cpp", "src/oh_adapter/src/rd_sqlite_utils.cpp", "src/oh_adapter/src/sqlite_store_executor_impl.cpp", ] configs = [ ":gaussdb_rd_config" ] public_configs = [ ":gaussdb_rd_public_config" ] ldflags = [ "-Wl,--exclude-libs,ALL" ] cflags_cc = [ "-fvisibility=hidden", "-std=c++17", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", ] public_external_deps = [ "cJSON:cjson", "sqlite:sqlite", ] subsystem_name = "distributeddatamgr" part_name = "kv_store" }