From 0a014d29e187359c91a17f92afa76ad98072c811 Mon Sep 17 00:00:00 2001 From: liangxinyan123 Date: Wed, 19 Feb 2025 11:15:19 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20linux=20arm64=E7=BC=96=E8=AF=91sdk-t?= =?UTF-8?q?hird=5Fparty=5Frust=5Fcxx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liangxinyan123 --- gen/cmd/BUILD.gn | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/gen/cmd/BUILD.gn b/gen/cmd/BUILD.gn index de28c016..0e202a89 100644 --- a/gen/cmd/BUILD.gn +++ b/gen/cmd/BUILD.gn @@ -13,24 +13,26 @@ import("//build/ohos.gni") -ohos_cargo_crate("cxxbridge") { - crate_type = "bin" - crate_root = "src/main.rs" +if (host_os != "linux" || host_cpu != "arm64") { + ohos_cargo_crate("cxxbridge") { + crate_type = "bin" + crate_root = "src/main.rs" - sources = [ "src/main.rs" ] - edition = "2018" - cargo_pkg_version = "1.0.97" - cargo_pkg_authors = "David Tolnay " - cargo_pkg_name = "cxxbridge-cmd" - cargo_pkg_description = - "C++ code generator for integrating `cxx` crate into a non-Cargo build." - deps = [ - "//third_party/rust/crates/clap:lib", - "//third_party/rust/crates/codespan/codespan-reporting:lib", - "//third_party/rust/crates/proc-macro2:lib", - "//third_party/rust/crates/quote:lib", - "//third_party/rust/crates/syn:lib", - ] - part_name = "rust_cxx" - subsystem_name = "thirdparty" + sources = [ "src/main.rs" ] + edition = "2018" + cargo_pkg_version = "1.0.97" + cargo_pkg_authors = "David Tolnay " + cargo_pkg_name = "cxxbridge-cmd" + cargo_pkg_description = + "C++ code generator for integrating `cxx` crate into a non-Cargo build." + deps = [ + "//third_party/rust/crates/clap:lib", + "//third_party/rust/crates/codespan/codespan-reporting:lib", + "//third_party/rust/crates/proc-macro2:lib", + "//third_party/rust/crates/quote:lib", + "//third_party/rust/crates/syn:lib", + ] + part_name = "rust_cxx" + subsystem_name = "thirdparty" + } } -- Gitee