From 25c89b30e09d837ead3cdf54294ba5c99592a58d Mon Sep 17 00:00:00 2001 From: liangxinyan123 Date: Tue, 18 Feb 2025 21:49:47 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20linux=20arm64=E7=BC=96=E8=AF=91sdk-t?= =?UTF-8?q?hird=5Fparty=5Frust=5Fclap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liangxinyan123 --- BUILD.gn | 112 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 207b380f..9cf194a7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,62 +13,64 @@ import("//build/ohos.gni") -ohos_cargo_crate("lib") { - crate_name = "clap" - crate_type = "rlib" - crate_root = "src/lib.rs" +if (host_os != "linux" || host_cpu != "arm64") { + ohos_cargo_crate("lib") { + crate_name = "clap" + crate_type = "rlib" + crate_root = "src/lib.rs" - sources = [ "src/lib.rs" ] - edition = "2021" - cargo_pkg_version = "4.1.13" - cargo_pkg_name = "clap" - cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser" - deps = [ - "//third_party/rust/crates/bitflags:lib", - "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})", - "//third_party/rust/crates/clap/clap_lex:lib", - "//third_party/rust/crates/is-terminal:lib", - "//third_party/rust/crates/once_cell:lib", - "//third_party/rust/crates/strsim-rs:lib", - "//third_party/rust/crates/termcolor:lib", - ] - features = [ - "color", - "error-context", - "help", - "std", - "suggestions", - "usage", - "derive", - ] -} + sources = [ "src/lib.rs" ] + edition = "2021" + cargo_pkg_version = "4.1.13" + cargo_pkg_name = "clap" + cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser" + deps = [ + "//third_party/rust/crates/bitflags:lib", + "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})", + "//third_party/rust/crates/clap/clap_lex:lib", + "//third_party/rust/crates/is-terminal:lib", + "//third_party/rust/crates/once_cell:lib", + "//third_party/rust/crates/strsim-rs:lib", + "//third_party/rust/crates/termcolor:lib", + ] + features = [ + "color", + "error-context", + "help", + "std", + "suggestions", + "usage", + "derive", + ] + } -ohos_cargo_crate("stdio_fixture") { - crate_type = "bin" - crate_root = "src/bin/stdio-fixture.rs" + ohos_cargo_crate("stdio_fixture") { + crate_type = "bin" + crate_root = "src/bin/stdio-fixture.rs" - sources = [ "src/bin/stdio-fixture.rs" ] - edition = "2021" - cargo_pkg_version = "4.1.13" - cargo_pkg_name = "clap" - cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser" - deps = [ - "//third_party/rust/crates/bitflags:lib", - "//third_party/rust/crates/clap:lib", - "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})", - "//third_party/rust/crates/clap/clap_lex:lib", - "//third_party/rust/crates/is-terminal:lib", - "//third_party/rust/crates/once_cell:lib", - "//third_party/rust/crates/strsim-rs:lib", - "//third_party/rust/crates/termcolor:lib", - ] - features = [ - "color", - "error-context", - "help", - "std", - "suggestions", - "usage", - "derive", - ] + sources = [ "src/bin/stdio-fixture.rs" ] + edition = "2021" + cargo_pkg_version = "4.1.13" + cargo_pkg_name = "clap" + cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser" + deps = [ + "//third_party/rust/crates/bitflags:lib", + "//third_party/rust/crates/clap:lib", + "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})", + "//third_party/rust/crates/clap/clap_lex:lib", + "//third_party/rust/crates/is-terminal:lib", + "//third_party/rust/crates/once_cell:lib", + "//third_party/rust/crates/strsim-rs:lib", + "//third_party/rust/crates/termcolor:lib", + ] + features = [ + "color", + "error-context", + "help", + "std", + "suggestions", + "usage", + "derive", + ] + } } -- Gitee