blob: fe85cff5a5f22f6c3b603671c65be4f44551b54b [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,
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080018 shared_libs: ["libcrypto"],
Victor Hsieh1fe51c42020-11-05 11:08:10 -080019 clippy_lints: "android",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080020
21 // libfuse_rust currently has only the 64-bit variant (or more broadly speaking, the whole
22 // crosvm projects). Limit the build to 64 bits since we won't need 32 bits anyway.
23 compile_multilib: "64",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080024}
25
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080026// TODO(b/172687320): remove once there is a canonical bindgen.
27rust_bindgen {
28 name: "libauthfs_crypto_bindgen",
29 wrapper_src: "src/crypto.hpp",
30 crate_name: "authfs_crypto_bindgen",
31 source_stem: "bindings",
32 shared_libs: [
33 "libcrypto",
34 ],
35 bindgen_flags: ["--size_t-is-usize"],
36 cflags: ["-D BORINGSSL_NO_CXX"],
37 host_supported: true,
38}
39
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080040rust_binary {
41 name: "authfs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080042 defaults: ["authfs_defaults"],
43}
44
45rust_test_host {
46 name: "authfs_host_test_src_lib",
47 test_suites: ["general-tests"],
48 defaults: ["authfs_defaults"],
49}
50
51// TODO(victorhsieh): Enable the test once "undefined symbol: _Unwind_Resume" is fixed, then add to
52// TEST_MAPPING.
53//rust_test {
54// name: "authfs_device_test_src_lib",
55// defaults: ["authfs_defaults"],
56//}