# Copyright (c) 2021 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("//base/update/updateservice/foundations/foundations.gni") import("//base/update/updateservice/updateengine.gni") import("//build/ohos.gni") import("../feature/feature.gni") ohos_prebuilt_etc("updater_sa.rc") { source = "etc/updater_sa.rc" relative_install_dir = "init" part_name = "$updateengine_part_name" subsystem_name = "updater" } config("updateengine_inner_library_native_config") { include_dirs = [ "$updateengine_root_path/interfaces/inner_api/include" ] include_dirs += feature_include include_dirs += foundations_include } ohos_shared_library("$updateengine_inner_library_name") { sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" defines = [ "DUAL_ADAPTER" ] sources = [ "$updateengine_root_path/interfaces/inner_api/engine/src/update_callback.cpp", "$updateengine_root_path/interfaces/inner_api/engine/src/update_callback_stub.cpp", "$updateengine_root_path/interfaces/inner_api/engine/src/update_service_kits_impl.cpp", "$updateengine_root_path/interfaces/inner_api/engine/src/update_service_proxy.cpp", ] include_dirs = [ "$updateengine_root_path/interfaces/inner_api/engine/include", "$updateengine_root_path/interfaces/inner_api/include", ] public_configs = [ ":updateengine_inner_library_native_config" ] deps = [ "$updateengine_root_path/foundations:update_foundations", "$updateengine_root_path/interfaces/inner_api/modulemgr:update_module_mgr", ] external_deps = [ "ability_runtime:ability_manager", "bounds_checking_function:libsec_static", "c_utils:utils", # sptr "hilog:libhilog", "ipc:ipc_core", "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] include_dirs += feature_include sources += feature_sources deps += feature_deps external_deps += feature_external_deps if (ability_ability_runtime_enable) { external_deps += [ "ability_runtime:extension_manager" ] } cflags = [ "-fPIC", "-Os", "-Werror", ] innerapi_tags = [ "platformsdk" ] part_name = "$updateengine_part_name" subsystem_name = "updater" }