# Copyright (c) 2022 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("//foundation/systemabilitymgr/samgr/services/samgr/var.gni") config("all_config_samgr_common") { include_dirs = [ "include" ] } config("config_samgr_common") { include_dirs = [ "include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/systemabilitymgr/samgr/services/dfx/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", ] } ################################################################################ ohos_shared_library("samgr_common") { version_script = "libsamgr_common.versionscript" sanitize = { integer_overflow = true boundary_sanitize = true ubsan = true cfi = true cfi_cross_dso = true debug = false cfi_no_nvcall = true blocklist = "../../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "//foundation/systemabilitymgr/samgr/services/common/src/parse_util.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/samgr_xcollie.cpp", ] defines = [] configs = [ ":config_samgr_common", "//foundation/systemabilitymgr/samgr/test/resource:coverage_flags", ] public_configs = [ ":config_samgr_common", ":all_config_samgr_common", ] external_deps = [ "libxml2:libxml2" ] all_dependent_configs = [ ":all_config_samgr_common", "//third_party/libxml2:libxml2_config", ] if (is_standard_system) { external_deps += [ "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", ] if (hicollie_able) { external_deps += [ "hicollie:libhicollie" ] defines += [ "HICOLLIE_ENABLE" ] } public_external_deps = [ "json:nlohmann_json_static" ] part_name = "samgr" } innerapi_tags = [ "platformsdk" ] subsystem_name = "systemabilitymgr" } ################################################################################