diff --git a/BUILD.gn b/BUILD.gn index cfda80c0dac7fee9b82b3be58b9d3968a4aa436b..dee53d07f5b910540caecf54f2a99043260f2ca1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -217,7 +217,6 @@ if (product_name != "ohos-sdk") { "//third_party/rust/crates/humantime:lib", "//third_party/rust/crates/libc:lib", "//third_party/rust/crates/log:lib", - "//third_party/rust/crates/rust-openssl/openssl:lib", ] features = [ "daemon" ] if (is_emulator && product_name != "ohos-sdk") { @@ -225,6 +224,7 @@ if (product_name != "ohos-sdk") { } external_deps = [ "hilog:hilog_rust", + "rust_rust-openssl:openssl", "ylong_runtime:ylong_runtime", ] subsystem_name = "developtools" @@ -277,9 +277,11 @@ template("build_hdc") { "//third_party/rust/crates/libc:lib", "//third_party/rust/crates/log:lib", "//third_party/rust/crates/nix:lib", - "//third_party/rust/crates/rust-openssl/openssl:lib", ] - external_deps = [ "hilog:hilog_rust" ] + external_deps = [ + "hilog:hilog_rust", + "rust_rust-openssl:openssl", + ] if (product_name != "ohos-sdk") { deps += [ diff --git a/bundle.json b/bundle.json index 8be4e787c0bddf95bc4af98980236acc633fbdfb..13f0e80d80f413661b9c07e68527d3a48e289a26 100644 --- a/bundle.json +++ b/bundle.json @@ -42,7 +42,9 @@ "user_auth_framework", "pin_auth" ], - "third_party": [] + "third_party": [ + "rust_rust-openssl" + ] }, "build": { "sub_component": [ diff --git a/hdc_rust/BUILD.gn b/hdc_rust/BUILD.gn index 17f6f81738d52daa717cc4cd64fc000d988cad9f..39a541e659520a028afa3bd02f818f1746e5752f 100644 --- a/hdc_rust/BUILD.gn +++ b/hdc_rust/BUILD.gn @@ -64,10 +64,10 @@ ohos_rust_executable("hdcd") { "//third_party/rust/crates/libc:lib", "//third_party/rust/crates/log:lib", "//third_party/rust/crates/nix:lib", - "//third_party/rust/crates/rust-openssl/openssl:lib", ] external_deps = [ "hilog:hilog_rust", + "rust_rust-openssl:openssl", "ylong_runtime:ylong_runtime", ] @@ -155,9 +155,11 @@ ohos_rust_static_library("hdc_library_host") { "//third_party/rust/crates/humantime:lib", "//third_party/rust/crates/libc:lib", "//third_party/rust/crates/log:lib", - "//third_party/rust/crates/rust-openssl/openssl:lib", ] - external_deps = [ "ylong_runtime:ylong_runtime_static" ] + external_deps = [ + "rust_rust-openssl:openssl", + "ylong_runtime:ylong_runtime_static", + ] features = [ "host" ] @@ -174,7 +176,6 @@ ohos_rust_executable("hdc_rust") { "//third_party/rust/crates/lazy-static.rs:lib", "//third_party/rust/crates/libc:lib", "//third_party/rust/crates/log:lib", - "//third_party/rust/crates/rust-openssl/openssl:lib", ] if (is_mingw) { @@ -184,7 +185,10 @@ ohos_rust_executable("hdc_rust") { # config to link libc++.a rust_static_link = true - external_deps = [ "ylong_runtime:ylong_runtime_static" ] + external_deps = [ + "rust_rust-openssl:openssl", + "ylong_runtime:ylong_runtime_static", + ] features = [ "host" ] subsystem_name = "developtools"