diff --git a/base/BUILD.gn b/base/BUILD.gn index e9b037cad9dd1fcb8a75c6111b6afcdd94dd4897..cbaec1503a38e9b0273af283eccfd574b1ad671d 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -224,10 +224,8 @@ if (host_os == "linux" && !is_arkui_x) { "include", "${target_gen_dir}", ] - deps = [ - ":cxx_rust_gen", - "//third_party/rust/crates/cxx:cxx_cppdeps", - ] + deps = [ ":cxx_rust_gen" ] + external_deps = [ "cxx:cxx_cppdeps" ] public_external_deps = [ "bounds_checking_function:libsec_shared" ] subsystem_name = "commonlibrary" part_name = "c_utils" @@ -243,10 +241,8 @@ if (!is_arkui_x) { "src/rust/file_ex.rs", "src/rust/lib.rs", ] - deps = [ - ":utils_static_cxx_rust", - "//third_party/rust/crates/cxx:lib", - ] + deps = [ ":utils_static_cxx_rust" ] + external_deps = [ "cxx:lib" ] crate_root = "src/rust/lib.rs" crate_name = "utils_rust" crate_type = "dylib" diff --git a/base/test/unittest/rust/BUILD.gn b/base/test/unittest/rust/BUILD.gn index 1b6d69f6dfcf585333f906748c8c4cb2ab7c7d12..e5646c2482aa589d8703b3a361fef0527adc4b26 100644 --- a/base/test/unittest/rust/BUILD.gn +++ b/base/test/unittest/rust/BUILD.gn @@ -41,18 +41,14 @@ if (host_os == "linux" && !is_asan && !is_arkui_x) { ohos_rust_unittest("rust_utils_file_test") { module_out_path = "utils/base/rust" sources = [ "rust_utils_file_test.rs" ] - deps = [ - "//commonlibrary/c_utils/base:utils_rust", - "//third_party/rust/crates/cxx:lib", - ] + deps = [ "//commonlibrary/c_utils/base:utils_rust" ] + external_deps = [ "cxx:lib" ] } ohos_rust_unittest("rust_utils_directory_test") { module_out_path = "utils/base/rust" sources = [ "rust_utils_directory_test.rs" ] - deps = [ - "//commonlibrary/c_utils/base:utils_rust", - "//third_party/rust/crates/cxx:lib", - ] + deps = [ "//commonlibrary/c_utils/base:utils_rust" ] + external_deps = [ "cxx:lib" ] } } diff --git a/bundle.json b/bundle.json index 1319fccbb48fe8fd0d49c4cb112d02b53a39baa8..ef40bc97de4075cc5502ee856a8a07a429c35499 100644 --- a/bundle.json +++ b/bundle.json @@ -22,6 +22,7 @@ ], "deps": { "components": [ + "cxx", "hilog" ], "third_party": [