blob: 985b8e2b1a8dcd424869df7457cacb68df0c1f2a [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: [
14 "libcxxbridge03",
15 ],
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,
22 name: "libcxxbridge03",
23 cflags: ["-DRUST_CXX_NO_EXCEPTIONS"],
24 srcs: ["src/cxx.cc"]
25}
26
27cc_library_static {
28 host_supported: true,
Matthew Maurer03f51602020-11-23 22:27:59 +000029 name: "libcxx-demo-blobstore",
30 srcs: ["demo/src/blobstore.cc"],
Matthew Maurer5a12fc82020-06-10 13:58:55 -070031 generated_headers: ["cxx-demo-bridge-header", "cxx-bridge-header"],
32 generated_sources: ["cxx-demo-bridge-code"],
33}
34
35genrule {
36 name: "cxx-bridge-header",
37 tools: ["cxxbridge"],
38 cmd: "$(location cxxbridge) --header > $(out)",
39 out: ["rust/cxx.h"],
40}