From a6458e325be4fd106e11764ed8a8270240fc0343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E9=9C=86=E5=A8=81?= <2158863620@qq.com> Date: Thu, 29 Feb 2024 08:20:22 +0000 Subject: [PATCH 1/2] =?UTF-8?q?mbedtls=E9=83=A8=E4=BB=B6=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 谢霆威 <2158863620@qq.com> --- BUILD.gn | 10 +++++++++- bundle.json | 11 +++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index af83609ad..231887019 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -125,7 +125,6 @@ if (defined(ohos_lite)) { import("//build/ohos.gni") config("mbedtls_config") { include_dirs = MBEDTLS_INLCUDE_DIRS - include_dirs += [ "//third_party/bounds_checking_function/include" ] } ohos_shared_library("mbedtls_shared") { @@ -136,6 +135,7 @@ if (defined(ohos_lite)) { "platformsdk_indirect", "sasdk", ] + external_deps = [ "bounds_checking_function:libsec_static" ] part_name = "mbedtls" sources = MBEDTLS_SOURCES install_images = [ @@ -144,6 +144,14 @@ if (defined(ohos_lite)) { ] } + ohos_static_library("mbedtls_static") { + sources = MBEDTLS_SOURCES + public_configs = [ ":mbedtls_config" ] + external_deps = [ "bounds_checking_function:libsec_static" ] + part_name = "mbedtls" + subsystem_name = "thirdparty" + } + group("mbedtls") { public_deps = [ ":mbedtls_shared" ] } diff --git a/bundle.json b/bundle.json index 272885909..b65049f42 100755 --- a/bundle.json +++ b/bundle.json @@ -38,6 +38,17 @@ ] }, "name" : "//third_party/mbedtls:mbedtls_shared" + }, + { + "header" : { + "header_base": "//third_party/mbedtls/include", + "header_files": [ + "mbedtls/md.h", + "mbedtls/rsa.h", + "mbedtls/x509.h" + ] + }, + "name" : "//third_party/mbedtls:mbedtls_static" } ], "test": [] -- Gitee From 2d1ece26406fd39e5d5d3db2580fb11f94134afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E9=9C=86=E5=A8=81?= <2158863620@qq.com> Date: Thu, 29 Feb 2024 08:39:03 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=9C=A8bundle.json=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9bounds=5Fchecking=5Ffunction=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 谢霆威 <2158863620@qq.com> --- bundle.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bundle.json b/bundle.json index b65049f42..2a5d25afe 100755 --- a/bundle.json +++ b/bundle.json @@ -22,8 +22,12 @@ "rom": "", "ram": "", "deps": { - "components": [], - "third_party": [] + "components": [ + "bounds_checking_function" + ], + "third_party": [ + "bounds_checking_function" + ] }, "build": { "sub_component": [], -- Gitee