From 24abdadaa50069c3747e0261a57985a87b73a1cb Mon Sep 17 00:00:00 2001 From: xujunyang Date: Mon, 7 Jul 2025 10:05:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E6=A0=88=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: xujunyang Change-Id: I826982d8706c5304f6a657c94ea060ab3813dc0c --- ylong_http_client/BUILD.gn | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ylong_http_client/BUILD.gn b/ylong_http_client/BUILD.gn index ffb399e..b713ed1 100644 --- a/ylong_http_client/BUILD.gn +++ b/ylong_http_client/BUILD.gn @@ -32,15 +32,18 @@ ohos_rust_shared_library("ylong_http_client_inner") { ] sources = [ "src/lib.rs" ] - deps = [ - "../ylong_http:ylong_http", - "//third_party/rust/crates/libc:lib", - ] + deps = [ "../ylong_http:ylong_http" ] external_deps = [ "openssl:libcrypto_shared", "openssl:libssl_shared", "ylong_runtime:ylong_runtime", ] + if (defined(global_parts_info) && + !defined(global_parts_info.third_party_rust_cxx)) { + deps += [ "//third_party/rust/crates/libc:lib" ] + } else { + external_deps += [ "rust_libc:lib" ] + } } ohos_rust_unittest("rust_ylong_http_client_test_ut") { @@ -59,13 +62,18 @@ ohos_rust_unittest("rust_ylong_http_client_test_ut") { sources = [ "src/lib.rs" ] deps = [ "../ylong_http:ylong_http", - "//third_party/rust/crates/libc:lib", ] external_deps = [ "openssl:libcrypto_shared", "openssl:libssl_shared", "ylong_runtime:ylong_runtime", ] + if (defined(global_parts_info) && + !defined(global_parts_info.third_party_rust_cxx)) { + deps += [ "//third_party/rust/crates/libc:lib" ] + } else { + external_deps += [ "rust_libc:lib" ] + } } group("unittest") { -- Gitee