blob: 104221e582db0df9b66dfc4da1c43c9f2b73e755 [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 Hsieh1fe51c42020-11-05 11:08:10 -080024 clippy_lints: "android",
Victor Hsieh9a0ee7e2021-01-11 15:00:10 -080025 defaults: ["crosvm_defaults"],
Victor Hsieh1fe51c42020-11-05 11:08:10 -080026}
27
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080028// TODO(b/172687320): remove once there is a canonical bindgen.
29rust_bindgen {
30 name: "libauthfs_crypto_bindgen",
31 wrapper_src: "src/crypto.hpp",
32 crate_name: "authfs_crypto_bindgen",
33 source_stem: "bindings",
34 shared_libs: [
35 "libcrypto",
36 ],
37 bindgen_flags: ["--size_t-is-usize"],
38 cflags: ["-D BORINGSSL_NO_CXX"],
39 host_supported: true,
40}
41
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080042rust_binary {
43 name: "authfs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080044 defaults: ["authfs_defaults"],
45}
46
47rust_test_host {
48 name: "authfs_host_test_src_lib",
49 test_suites: ["general-tests"],
50 defaults: ["authfs_defaults"],
51}
52
53// TODO(victorhsieh): Enable the test once "undefined symbol: _Unwind_Resume" is fixed, then add to
54// TEST_MAPPING.
55//rust_test {
56// name: "authfs_device_test_src_lib",
57// defaults: ["authfs_defaults"],
58//}