1# Copyright (C) 2024-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("//base/security/huks/build/config.gni") 15import("//base/security/huks/huks.gni") 16import("//build/ohos.gni") 17 18config("huks_config") { 19 include_dirs = [ "include" ] 20} 21 22ohos_static_library("libhuks_upgrade_lock_static") { 23 subsystem_name = "security" 24 part_name = "huks" 25 public_configs = [ ":huks_config" ] 26 27 sources = [ "src/hks_upgrade_lock.cpp" ] 28 29 deps = [ 30 "../../../../../../frameworks/huks_standard/main/common:libhuks_common_standard_static", 31 "../../../../../../utils/condition:libhuks_utils_condition_static", 32 "../../../../../../utils/mutex:libhuks_utils_mutex_static", 33 ] 34 35 complete_static_lib = true 36 37 branch_protector_ret = "pac_ret" 38 39 sanitize = { 40 integer_overflow = true 41 cfi = true 42 debug = false 43 cfi_cross_dso = true 44 boundary_sanitize = true 45 ubsan = true 46 } 47 48 configs = 49 [ "../../../../../../frameworks/config/build:l2_standard_common_config" ] 50 external_deps = [ 51 "c_utils:utils", 52 "hilog:libhilog", 53 ] 54} 55