blob: 9d57757b5945a5d20cf936bd41a00ac229bbe4eb [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,
29 name: "libcxx-demo-cxx",
30 srcs: ["demo-cxx/demo.cc"],
31 local_include_dirs: ["demo-cxx"],
32 generated_headers: ["cxx-demo-bridge-header", "cxx-bridge-header"],
33 generated_sources: ["cxx-demo-bridge-code"],
34}
35
36genrule {
37 name: "cxx-bridge-header",
38 tools: ["cxxbridge"],
39 cmd: "$(location cxxbridge) --header > $(out)",
40 out: ["rust/cxx.h"],
41}