blob: 2cabd8d336c506ebc7478aff6cbd48443876f14d [file] [log] [blame]
rust_library {
name: "libcxx",
crate_name: "cxx",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
"libanyhow",
"libthiserror",
],
proc_macros: [
"libcxxbridge_macro",
],
static_libs: [
"libcxxbridge05",
],
shared_libs: ["libc++"],
host_supported: true,
}
cc_library_static {
host_supported: true,
name: "libcxxbridge05",
cflags: ["-DRUST_CXX_NO_EXCEPTIONS"],
srcs: ["src/cxx.cc"],
apex_available: [
"//apex_available:platform",
"com.android.bluetooth.updatable",
],
}
cc_library_static {
host_supported: true,
name: "libcxx-demo-blobstore",
srcs: ["demo/src/blobstore.cc"],
generated_headers: ["cxx-demo-bridge-header", "cxx-bridge-header"],
generated_sources: ["cxx-demo-bridge-code"],
}
genrule {
name: "cxx-bridge-header",
tools: ["cxxbridge"],
cmd: "$(location cxxbridge) --header > $(out)",
out: ["rust/cxx.h"],
}