# 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("//build/ohos.gni") config("huks_config") { include_dirs = [ "include" ] } ohos_shared_library("huks_ndk") { public_configs = [ ":huks_config" ] defines = [ "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] branch_protector_ret = "pac_ret" version_script = "libhuksndk.map" sanitize = { integer_overflow = true cfi = true debug = false cfi_cross_dso = true boundary_sanitize = true ubsan = true } include_dirs = [ "//base/security/huks/interfaces/kits/c/include", "//base/security/huks/interfaces/inner_api/huks_standard/main/include", "//base/security/huks/frameworks/huks_standard/main/common/include", ] sources = [ "//base/security/huks/interfaces/kits/c/src/native_huks_api_adapter.c", "src/native_huks_api.c", "src/native_huks_param.c", ] deps = [ "//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk", ] external_deps = [ "hilog:libhilog" ] cflags_cc = [ "-Wall", "-Werror", ] innerapi_tags = [ "platformsdk" ] part_name = "huks" subsystem_name = "security" }