Merge pull request !8 from xxlight/dev_cxxdeps
This commit is contained in:
openharmony_ci 2023-06-29 06:29:31 +00:00 committed by Gitee
commit 77161f8ab0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -32,3 +32,19 @@ ohos_cargo_crate("lib") {
build_root = "build.rs"
build_sources = [ "build.rs" ]
}
ohos_static_library("cxx_cppdeps") {
part_name = "common"
subsystem_name = "common"
defines = [ "RUST_CXX_NO_EXCEPTIONS" ]
sources = [
"//third_party/rust/crates/cxx/include/cxx.h",
"//third_party/rust/crates/cxx/src/cxx.cc",
]
deps = [ "//third_party/rust/crates/cxx:lib" ]
if (is_win) {
defines += [ "CXX_RS_EXPORT=__declspec(dllexport)" ]
} else {
defines += [ "CXX_RS_EXPORT=__attribute__((visibility(\"default\")))" ]
}
}