From 7b2e508579a23c1592009065e0c4621b6c738475 Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Thu, 13 Jun 2024 11:20:02 +0300 Subject: [PATCH 1/3] cxx include_dir rectification Signed-off-by: Alexander Kuznetsov Change-Id: I22360493d37d7faed4bd7327dc132dba8c98b0c2 --- base/BUILD.gn | 12 ++++-------- base/test/unittest/rust/BUILD.gn | 12 ++++-------- bundle.json | 1 + 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/base/BUILD.gn b/base/BUILD.gn index e9b037c..0e5ceac 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 1b6d69f..35063ba 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 1319fcc..ef40bc9 100644 --- a/bundle.json +++ b/bundle.json @@ -22,6 +22,7 @@ ], "deps": { "components": [ + "cxx", "hilog" ], "third_party": [ -- Gitee From 218d0f65e42121019be5da34475e0c6a031d3337 Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Fri, 14 Jun 2024 12:46:39 +0300 Subject: [PATCH 2/3] cxx include_dir rectification Signed-off-by: Alexander Kuznetsov Change-Id: I9d672f320b975cb6619f2183a3f45ee276240a4a --- base/BUILD.gn | 2 +- base/test/unittest/rust/BUILD.gn | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/BUILD.gn b/base/BUILD.gn index 0e5ceac..d775f7a 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -242,7 +242,7 @@ if (!is_arkui_x) { "src/rust/lib.rs", ] deps = [ ":utils_static_cxx_rust" ] - external_deps = [ "cxx:lib" ] + 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 35063ba..e5646c2 100644 --- a/base/test/unittest/rust/BUILD.gn +++ b/base/test/unittest/rust/BUILD.gn @@ -42,13 +42,13 @@ if (host_os == "linux" && !is_asan && !is_arkui_x) { module_out_path = "utils/base/rust" sources = [ "rust_utils_file_test.rs" ] deps = [ "//commonlibrary/c_utils/base:utils_rust" ] - external_deps = [ "cxx:lib" ] + 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" ] - external_deps = [ "cxx:lib" ] + external_deps = [ "cxx:lib" ] } } -- Gitee From 83670a7e6c9027b78400533c625ffe91052ff4ab Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Fri, 14 Jun 2024 12:48:33 +0300 Subject: [PATCH 3/3] cxx include_dir rectification Signed-off-by: Alexander Kuznetsov Change-Id: Ie66e08171f8ec508f8922214cf1933391d298eb2 --- base/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/BUILD.gn b/base/BUILD.gn index d775f7a..cbaec15 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -225,7 +225,7 @@ if (host_os == "linux" && !is_arkui_x) { "${target_gen_dir}", ] deps = [ ":cxx_rust_gen" ] - external_deps = [ "cxx:cxx_cppdeps" ] + external_deps = [ "cxx:cxx_cppdeps" ] public_external_deps = [ "bounds_checking_function:libsec_shared" ] subsystem_name = "commonlibrary" part_name = "c_utils" -- Gitee