diff --git a/BUILD.gn b/BUILD.gn index 8ab968395d579cb59a24bda606e9879909b2c6fd..a8954ef3b34894d12a0b63ad321a1a7c598a838b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -24,10 +24,7 @@ ohos_cargo_crate("lib") { cargo_pkg_authors = "David Tolnay " cargo_pkg_name = "cxx" cargo_pkg_description = "Safe interop between Rust and C++" - deps = [ - "//third_party/rust/crates/cxx/macro:lib(${host_toolchain})", - "//third_party/rust/crates/link-cplusplus:lib", - ] + deps = [ "//third_party/rust/crates/cxx/macro:lib(${host_toolchain})" ] features = [ "alloc", "std", diff --git a/build.rs b/build.rs index 9158b1c84a2afa1c636e01d955f1a5bdcbfc55d9..b51536f75ca8a923e58755c9712d3ceadac55df6 100644 --- a/build.rs +++ b/build.rs @@ -3,23 +3,6 @@ use std::path::Path; use std::process::Command; fn main() { - cc::Build::new() - .file("src/cxx.cc") - .cpp(true) - .cpp_link_stdlib(None) // linked via link-cplusplus crate - .flag_if_supported(cxxbridge_flags::STD) - .warnings_into_errors(cfg!(deny_warnings)) - .compile("cxxbridge1"); - - println!("cargo:rerun-if-changed=src/cxx.cc"); - println!("cargo:rerun-if-changed=include/cxx.h"); - println!("cargo:rustc-cfg=built_with_cargo"); - - if let Some(manifest_dir) = env::var_os("CARGO_MANIFEST_DIR") { - let cxx_h = Path::new(&manifest_dir).join("include").join("cxx.h"); - println!("cargo:HEADER={}", cxx_h.to_string_lossy()); - } - if let Some(rustc) = rustc_version() { if rustc.minor < 60 { println!("cargo:warning=The cxx crate requires a rustc version 1.60.0 or newer.");