blob: 2cabd8d336c506ebc7478aff6cbd48443876f14d [file] [log] [blame]
Matthew Maurer5a12fc82020-06-10 13:58:55 -07001rust_library {
2 name: "libcxx",
3 crate_name: "cxx",
4 srcs: ["src/lib.rs"],
5 edition: "2018",
6 rustlibs: [
7 "libanyhow",
8 "libthiserror",
9 ],
10 proc_macros: [
11 "libcxxbridge_macro",
12 ],
13 static_libs: [
Zach Johnson0d15d492020-11-30 09:21:42 -080014 "libcxxbridge05",
Matthew Maurer5a12fc82020-06-10 13:58:55 -070015 ],
16 shared_libs: ["libc++"],
Zach Johnsonc95654c2020-11-18 12:51:57 -080017 host_supported: true,
Matthew Maurer5a12fc82020-06-10 13:58:55 -070018}
19
20cc_library_static {
21 host_supported: true,
Zach Johnson0d15d492020-11-30 09:21:42 -080022 name: "libcxxbridge05",
Matthew Maurer5a12fc82020-06-10 13:58:55 -070023 cflags: ["-DRUST_CXX_NO_EXCEPTIONS"],
Zach Johnson0d15d492020-11-30 09:21:42 -080024 srcs: ["src/cxx.cc"],
25 apex_available: [
26 "//apex_available:platform",
27 "com.android.bluetooth.updatable",
28 ],
Matthew Maurer5a12fc82020-06-10 13:58:55 -070029}
30
31cc_library_static {
32 host_supported: true,
Matthew Maurer03f51602020-11-23 22:27:59 +000033 name: "libcxx-demo-blobstore",
34 srcs: ["demo/src/blobstore.cc"],
Matthew Maurer5a12fc82020-06-10 13:58:55 -070035 generated_headers: ["cxx-demo-bridge-header", "cxx-bridge-header"],
36 generated_sources: ["cxx-demo-bridge-code"],
37}
38
39genrule {
40 name: "cxx-bridge-header",
41 tools: ["cxxbridge"],
42 cmd: "$(location cxxbridge) --header > $(out)",
43 out: ["rust/cxx.h"],
44}