blob: 225ff40205be2f7f81df07b5d1ffca24ccf59580 [file] [log] [blame]
Victor Hsieh1fe51c42020-11-05 11:08:10 -08001rust_defaults {
2 name: "authfs_defaults",
3 crate_name: "authfs",
4 srcs: [
Victor Hsieh88ac6ca2020-11-13 15:20:24 -08005 "src/main.rs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -08006 ],
7 edition: "2018",
8 rustlibs: [
Victor Hsiehec184562020-11-06 13:50:31 -08009 "libanyhow",
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080010 "libauthfs_crypto_bindgen",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080011 "libcfg_if",
12 "libfuse_rust",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080013 "liblibc",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080014 "libstructopt",
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080015 "libthiserror",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080016 ],
17 host_supported: true,
ThiƩbaud Weksteen858a9282021-01-12 12:02:37 +010018 target: {
19 darwin: {
20 enabled: false,
21 },
22 },
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080023 shared_libs: ["libcrypto"],
Victor Hsieh9a0ee7e2021-01-11 15:00:10 -080024 defaults: ["crosvm_defaults"],
Victor Hsieh1fe51c42020-11-05 11:08:10 -080025}
26
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080027// TODO(b/172687320): remove once there is a canonical bindgen.
28rust_bindgen {
29 name: "libauthfs_crypto_bindgen",
30 wrapper_src: "src/crypto.hpp",
31 crate_name: "authfs_crypto_bindgen",
32 source_stem: "bindings",
33 shared_libs: [
34 "libcrypto",
35 ],
36 bindgen_flags: ["--size_t-is-usize"],
37 cflags: ["-D BORINGSSL_NO_CXX"],
38 host_supported: true,
39}
40
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080041rust_binary {
42 name: "authfs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080043 defaults: ["authfs_defaults"],
44}
45
46rust_test_host {
47 name: "authfs_host_test_src_lib",
48 test_suites: ["general-tests"],
49 defaults: ["authfs_defaults"],
50}
51
52// TODO(victorhsieh): Enable the test once "undefined symbol: _Unwind_Resume" is fixed, then add to
53// TEST_MAPPING.
54//rust_test {
55// name: "authfs_device_test_src_lib",
56// defaults: ["authfs_defaults"],
57//}