From fe924abb25e8066a0e10ffb5d259863d312386ee Mon Sep 17 00:00:00 2001 From: xqq879988 Date: Fri, 20 Jun 2025 14:16:45 +0800 Subject: [PATCH] =?UTF-8?q?rust=5Fcxx=E9=83=A8=E4=BB=B6=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xqq879988 --- interfaces/innerkits/rust/BUILD.gn | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/interfaces/innerkits/rust/BUILD.gn b/interfaces/innerkits/rust/BUILD.gn index e847b7e1..7c0c83f5 100644 --- a/interfaces/innerkits/rust/BUILD.gn +++ b/interfaces/innerkits/rust/BUILD.gn @@ -45,9 +45,15 @@ ohos_static_library("samgr_rust_cpp") { "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", - "rust_cxx:cxx_cppdeps", ] + if (defined(global_parts_info) && + !defined(global_parts_info.third_party_rust_cxx)) { + deps += [ "//third_party/rust/crates/cxx:cxx_cppdeps" ] + } else { + external_deps += [ "rust_cxx:cxx_cppdeps" ] + } + subsystem_name = "systemabilitymgr" part_name = "samgr" } @@ -60,11 +66,17 @@ ohos_rust_shared_library("samgr_rust") { external_deps = [ "hilog:hilog_rust", "ipc:ipc_rust", - "rust_cxx:lib", ] deps = [ ":samgr_rust_cpp" ] + if (defined(global_parts_info) && + !defined(global_parts_info.third_party_rust_cxx)) { + deps += [ "//third_party/rust/crates/cxx:lib" ] + } else { + external_deps += [ "rust_cxx:lib" ] + } + crate_name = "samgr" install_images = [ system_base_dir ] -- Gitee