1# Copyright (c) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17config("startup_util_config") { 18 include_dirs = [ "include" ] 19} 20 21ohos_shared_library("startup_util") { 22 sanitize = { 23 integer_overflow = true 24 ubsan = true 25 boundary_sanitize = true 26 cfi = true 27 cfi_cross_dso = true 28 debug = false 29 } 30 branch_protector_ret = "pac_ret" 31 32 include_dirs = [ 33 "${ability_runtime_utils_path}/global/constant", 34 "${ability_runtime_utils_path}/server/constant", 35 ] 36 37 sources = [ 38 "src/param.cpp", 39 "src/startup_util.cpp", 40 ] 41 42 public_configs = [ ":startup_util_config" ] 43 44 defines = [ "AMS_LOG_TAG = \"StartupUtil\"" ] 45 defines += [ "AMS_LOG_DOMAIN = 0xD001306" ] 46 cflags = [] 47 if (target_cpu == "arm") { 48 cflags += [ "-DBINDER_IPC_32BIT" ] 49 } 50 51 external_deps = [ 52 "ability_base:want", 53 "bundle_framework:appexecfwk_base", 54 "c_utils:utils", 55 "ipc:ipc_single", 56 ] 57 58 innerapi_tags = [ "platformsdk" ] 59 subsystem_name = "ability" 60 part_name = "ability_runtime" 61} 62