fix: 通过deps来继承mbedtls的宏配置

Signed-off-by: likailong <likailong@huawei.com>
This commit is contained in:
likailong 2022-01-24 12:21:14 +08:00
parent f75c0074cd
commit 8f20affdef
4 changed files with 5 additions and 17 deletions

View File

@ -22,9 +22,6 @@ declare_args() {
# if HUKS use mbedtls engine
huks_use_mbedtls = true
# mbedtls path when HUKS using mbedlts engine
huks_mbedtls_path = "//third_party/mbedtls/include"
# whether use lite storeage
huks_use_lite_storage = false

View File

@ -21,13 +21,12 @@ shared_library("cipher_shared") {
include_dirs = [
"include",
"//third_party/mbedtls/include/mbedtls",
"//third_party/bounds_checking_function/include",
]
deps = [
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/mbedtls:mbedtls_shared",
"//third_party/mbedtls",
]
cflags = [

View File

@ -24,7 +24,6 @@ ohos_static_library("libhuks_mbedtls_standard_static") {
include_dirs = [
"//utils/native/base/include",
"//third_party/mbedtls/include/",
"//third_party/openssl/include/",
"//third_party/openssl/crypto/ec/",
]
@ -55,7 +54,7 @@ ohos_static_library("libhuks_mbedtls_standard_static") {
deps = [
"//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static",
"//third_party/mbedtls:mbedtls_shared",
"//third_party/mbedtls",
"//third_party/openssl:libcrypto_static",
]
cflags = [

View File

@ -84,10 +84,8 @@ config("hilog_lite_dir") {
}
config("mbedtls_engine") {
include_dirs = [
"../../../frameworks/huks_standard/main/crypto_engine/mbedtls/include",
huks_mbedtls_path,
]
include_dirs =
[ "../../../frameworks/huks_standard/main/crypto_engine/mbedtls/include" ]
}
config("soft_huks_config") {
@ -165,12 +163,7 @@ if (ohos_kernel_type == "liteos_m") {
if (huks_use_mbedtls == true) {
sources += huks_mbedtls_engine_sources
deps = []
#deps += [ "//build/lite/config/component/openssl:openssl_static" ]
if (huks_mbedtls_path == "//third_party/mbedtls/include") {
deps += [ "//third_party/mbedtls:mbedtls_static" ]
}
deps = [ "//third_party/mbedtls" ]
configs += [ ":mbedtls_engine" ]
}