1190978c3Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2190978c3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3190978c3Sopenharmony_ci# you may not use this file except in compliance with the License. 4190978c3Sopenharmony_ci# You may obtain a copy of the License at 5190978c3Sopenharmony_ci# 6190978c3Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7190978c3Sopenharmony_ci# 8190978c3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9190978c3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10190978c3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11190978c3Sopenharmony_ci# See the License for the specific language governing permissions and 12190978c3Sopenharmony_ci# limitations under the License. 13190978c3Sopenharmony_ci 14190978c3Sopenharmony_ciimport("//base/update/updateservice/foundations/foundations.gni") 15190978c3Sopenharmony_ciimport("//base/update/updateservice/updateengine.gni") 16190978c3Sopenharmony_ciimport("//build/ohos.gni") 17190978c3Sopenharmony_ciimport("../feature/feature.gni") 18190978c3Sopenharmony_ci 19190978c3Sopenharmony_ciohos_prebuilt_etc("updater_sa.rc") { 20190978c3Sopenharmony_ci source = "etc/updater_sa.rc" 21190978c3Sopenharmony_ci relative_install_dir = "init" 22190978c3Sopenharmony_ci part_name = "$updateengine_part_name" 23190978c3Sopenharmony_ci subsystem_name = "updater" 24190978c3Sopenharmony_ci} 25190978c3Sopenharmony_ci 26190978c3Sopenharmony_ciconfig("updateengine_inner_library_native_config") { 27190978c3Sopenharmony_ci include_dirs = [ "$updateengine_root_path/interfaces/inner_api/include" ] 28190978c3Sopenharmony_ci include_dirs += feature_include 29190978c3Sopenharmony_ci include_dirs += foundations_include 30190978c3Sopenharmony_ci} 31190978c3Sopenharmony_ci 32190978c3Sopenharmony_ciohos_shared_library("$updateengine_inner_library_name") { 33190978c3Sopenharmony_ci sanitize = { 34190978c3Sopenharmony_ci integer_overflow = true 35190978c3Sopenharmony_ci ubsan = true 36190978c3Sopenharmony_ci boundary_sanitize = true 37190978c3Sopenharmony_ci cfi = true 38190978c3Sopenharmony_ci cfi_cross_dso = true 39190978c3Sopenharmony_ci debug = false 40190978c3Sopenharmony_ci } 41190978c3Sopenharmony_ci branch_protector_ret = "pac_ret" 42190978c3Sopenharmony_ci 43190978c3Sopenharmony_ci defines = [ "DUAL_ADAPTER" ] 44190978c3Sopenharmony_ci if (!ability_ability_runtime_enable) { 45190978c3Sopenharmony_ci defines += [ "ABILITY_RUNTIME_INNER_ENABLE" ] 46190978c3Sopenharmony_ci } 47190978c3Sopenharmony_ci sources = [ 48190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/engine/src/update_callback.cpp", 49190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/engine/src/update_callback_stub.cpp", 50190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/engine/src/update_service_kits_impl.cpp", 51190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/engine/src/update_service_proxy.cpp", 52190978c3Sopenharmony_ci ] 53190978c3Sopenharmony_ci 54190978c3Sopenharmony_ci include_dirs = [ 55190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/engine/include", 56190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/include", 57190978c3Sopenharmony_ci ] 58190978c3Sopenharmony_ci 59190978c3Sopenharmony_ci public_configs = [ ":updateengine_inner_library_native_config" ] 60190978c3Sopenharmony_ci 61190978c3Sopenharmony_ci deps = [ 62190978c3Sopenharmony_ci "$updateengine_root_path/foundations:update_foundations", 63190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/modulemgr:update_module_mgr", 64190978c3Sopenharmony_ci ] 65190978c3Sopenharmony_ci 66190978c3Sopenharmony_ci external_deps = [ 67190978c3Sopenharmony_ci "bounds_checking_function:libsec_static", 68190978c3Sopenharmony_ci "c_utils:utils", # sptr 69190978c3Sopenharmony_ci "hilog:libhilog", 70190978c3Sopenharmony_ci "ipc:ipc_core", 71190978c3Sopenharmony_ci "json:nlohmann_json_static", 72190978c3Sopenharmony_ci "safwk:system_ability_fwk", 73190978c3Sopenharmony_ci "samgr:samgr_proxy", 74190978c3Sopenharmony_ci ] 75190978c3Sopenharmony_ci 76190978c3Sopenharmony_ci include_dirs += feature_include 77190978c3Sopenharmony_ci sources += feature_sources 78190978c3Sopenharmony_ci deps += feature_deps 79190978c3Sopenharmony_ci external_deps += feature_external_deps 80190978c3Sopenharmony_ci 81190978c3Sopenharmony_ci if (ability_ability_runtime_enable) { 82190978c3Sopenharmony_ci external_deps += [ "ability_runtime:extension_manager" ] 83190978c3Sopenharmony_ci } 84190978c3Sopenharmony_ci 85190978c3Sopenharmony_ci cflags = [ 86190978c3Sopenharmony_ci "-fPIC", 87190978c3Sopenharmony_ci "-Os", 88190978c3Sopenharmony_ci "-Werror", 89190978c3Sopenharmony_ci ] 90190978c3Sopenharmony_ci 91190978c3Sopenharmony_ci innerapi_tags = [ "platformsdk" ] 92190978c3Sopenharmony_ci part_name = "$updateengine_part_name" 93190978c3Sopenharmony_ci subsystem_name = "updater" 94190978c3Sopenharmony_ci} 95