1526fd984Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2526fd984Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3526fd984Sopenharmony_ci# you may not use this file except in compliance with the License. 4526fd984Sopenharmony_ci# You may obtain a copy of the License at 5526fd984Sopenharmony_ci# 6526fd984Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7526fd984Sopenharmony_ci# 8526fd984Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9526fd984Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10526fd984Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11526fd984Sopenharmony_ci# See the License for the specific language governing permissions and 12526fd984Sopenharmony_ci# limitations under the License. 13526fd984Sopenharmony_ci 14526fd984Sopenharmony_ciimport("//build/ohos.gni") 15526fd984Sopenharmony_ci 16526fd984Sopenharmony_ciconfig("huks_config") { 17526fd984Sopenharmony_ci include_dirs = [ "include" ] 18526fd984Sopenharmony_ci} 19526fd984Sopenharmony_ci 20526fd984Sopenharmony_ciohos_shared_library("huks_ndk") { 21526fd984Sopenharmony_ci public_configs = [ ":huks_config" ] 22526fd984Sopenharmony_ci defines = [ 23526fd984Sopenharmony_ci "L2_STANDARD", 24526fd984Sopenharmony_ci "_HARDWARE_ROOT_KEY_", 25526fd984Sopenharmony_ci "_HUKS_LOG_ENABLE_", 26526fd984Sopenharmony_ci ] 27526fd984Sopenharmony_ci 28526fd984Sopenharmony_ci branch_protector_ret = "pac_ret" 29526fd984Sopenharmony_ci 30526fd984Sopenharmony_ci version_script = "libhuksndk.map" 31526fd984Sopenharmony_ci 32526fd984Sopenharmony_ci sanitize = { 33526fd984Sopenharmony_ci integer_overflow = true 34526fd984Sopenharmony_ci cfi = true 35526fd984Sopenharmony_ci debug = false 36526fd984Sopenharmony_ci cfi_cross_dso = true 37526fd984Sopenharmony_ci boundary_sanitize = true 38526fd984Sopenharmony_ci ubsan = true 39526fd984Sopenharmony_ci } 40526fd984Sopenharmony_ci 41526fd984Sopenharmony_ci include_dirs = [ 42526fd984Sopenharmony_ci "//base/security/huks/interfaces/kits/c/include", 43526fd984Sopenharmony_ci "//base/security/huks/interfaces/inner_api/huks_standard/main/include", 44526fd984Sopenharmony_ci "//base/security/huks/frameworks/huks_standard/main/common/include", 45526fd984Sopenharmony_ci ] 46526fd984Sopenharmony_ci 47526fd984Sopenharmony_ci sources = [ 48526fd984Sopenharmony_ci "//base/security/huks/interfaces/kits/c/src/native_huks_api_adapter.c", 49526fd984Sopenharmony_ci "src/native_huks_api.c", 50526fd984Sopenharmony_ci "src/native_huks_param.c", 51526fd984Sopenharmony_ci ] 52526fd984Sopenharmony_ci 53526fd984Sopenharmony_ci deps = [ 54526fd984Sopenharmony_ci "//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk", 55526fd984Sopenharmony_ci ] 56526fd984Sopenharmony_ci 57526fd984Sopenharmony_ci external_deps = [ "hilog:libhilog" ] 58526fd984Sopenharmony_ci 59526fd984Sopenharmony_ci cflags_cc = [ 60526fd984Sopenharmony_ci "-Wall", 61526fd984Sopenharmony_ci "-Werror", 62526fd984Sopenharmony_ci ] 63526fd984Sopenharmony_ci 64526fd984Sopenharmony_ci innerapi_tags = [ "platformsdk" ] 65526fd984Sopenharmony_ci part_name = "huks" 66526fd984Sopenharmony_ci subsystem_name = "security" 67526fd984Sopenharmony_ci} 68