From 4340ccf6663d43842396937fd8d8e216bc102c86 Mon Sep 17 00:00:00 2001 From: lnlan Date: Tue, 13 Jul 2021 14:39:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dmbedtls=E9=9D=99?= =?UTF-8?q?=E6=80=81=E5=BA=93=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99=20?= =?UTF-8?q?=E3=80=90=E8=83=8C=E6=99=AF=E3=80=91=E4=BE=9D=E8=B5=96=E7=9A=84?= =?UTF-8?q?posix=E8=B7=AF=E5=BE=84=E6=9C=89=E5=8F=98=E5=8C=96=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【修改方案】 1. 修改BUILD.gn中的依赖路径 【影响】 对现有的产品编译不会有影响 re #I40EMM Signed-off-by: lanleinan Change-Id: I393fe40a142f078419b4fb8b404d5cb67ba9476c --- BUILD.gn | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 1397c8b..ad9f629 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -110,8 +110,12 @@ lite_library("mbedtls_static") { target_type = "static_library" public_configs = [ ":mbedtls_config" ] if (ohos_kernel_type == "liteos_m") { - public_deps = [ "//kernel/liteos_m/kal/posix" ] - include_dirs = [ "//kernel/liteos_m/kal/posix/include", ] + include_dirs = [ + "//kernel/liteos_m/kal/posix/include", + "//kernel/liteos_m/kernel/include", + "//kernel/liteos_m/utils", + "//third_party/musl/porting/liteos_m/kernel/include/", + ] } output_name = "mbedtls" sources = mbedtls_sources @@ -136,16 +140,13 @@ ndk_lib("mbedtls_ndk") { } # for test: test profile -if (ohos_build_type == "debug") { +if (ohos_build_type == "debug" && ohos_kernel_type != "liteos_m") { config("mbedtls_profile_test") { include_dirs = [ "./include", "./configs", # The directory where the custom configuration file is # located ] - if (ohos_kernel_type == "liteos_m") { - include_dirs = [ "//kernel/liteos_m/kal/posix/include" ] - } defines = [ "MBEDTLS_CONFIG_FILE=", "__unix__", @@ -174,8 +175,5 @@ if (ohos_build_type == "debug") { sources = mbedtls_sources output_name = "mbedtls_gt" public_configs = [ ":mbedtls_profile_test" ] - if (ohos_kernel_type == "liteos_m") { - deps = [ "//kernel/liteos_m/kal/posix" ] - } } } -- GitLab