# Copyright (C) 2021-2023 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/security/huks/build/config.gni") import("//build/ohos.gni") if (os_level == "standard") { ohos_static_library("libhuks_service_standard_static") { subsystem_name = "security" part_name = "huks" public_deps = [ "//base/security/huks/services/huks_standard/huks_service/main/core:libhuks_service_core_standard_static", "//base/security/huks/services/huks_standard/huks_service/main/os_dependency:libhuks_service_os_dependency_standard_static", ] complete_static_lib = true branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true cfi = true debug = false cfi_cross_dso = true boundary_sanitize = true ubsan = true } configs = [ "//base/security/huks/frameworks/config/build:l2_standard_common_config", ] external_deps = [ "hilog:libhilog" ] } ohos_executable("hks_compatibility_bin") { subsystem_name = "security" part_name = "huks" sanitize = { integer_overflow = true cfi = true debug = false cfi_cross_dso = true boundary_sanitize = true ubsan = true } branch_protector_ret = "pac_ret" sources = [ "//base/security/huks/utils/compatibility_bin/compatibility_standard_bin.c" ] cflags = [ "-DHKS_CONFIG_RKC_STORE_PATH=\"${huks_use_rkc_in_standard_path}\"" ] external_deps = [ "bounds_checking_function:libsec_static", "hilog:libhilog", ] install_enable = true } } else { ohos_static_library("libhuks_service_small_static") { public_deps = [ "//base/security/huks/services/huks_standard/huks_service/main/core:libhuks_service_core_small_static", # "//base/security/huks/services/huks_standard/huks_service/main/os_dependency:libhuks_service_os_dependency_small_static", "//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl:libhuks_service_idl_small_static", ] configs = [ "//base/security/huks/frameworks/config/build:l1_small_common_config", ] complete_static_lib = true cflags = [] external_deps = [ "hilog_lite:hilog_shared" ] } }