blob: 9f7be9333c458bf445f78da336e130395aaa03ab [file] [log] [blame]
Bob Badour2efc4762021-02-03 18:36:27 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Victor Hsieh1fe51c42020-11-05 11:08:10 -08005rust_defaults {
6 name: "authfs_defaults",
7 crate_name: "authfs",
8 srcs: [
Victor Hsieh88ac6ca2020-11-13 15:20:24 -08009 "src/main.rs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080010 ],
11 edition: "2018",
12 rustlibs: [
Victor Hsiehf01f3232020-12-11 13:31:31 -080013 "authfs_aidl_interface-rust",
Victor Hsiehec184562020-11-06 13:50:31 -080014 "libanyhow",
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080015 "libauthfs_crypto_bindgen",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080016 "libcfg_if",
17 "libfuse_rust",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080018 "liblibc",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080019 "libstructopt",
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080020 "libthiserror",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080021 ],
ThiƩbaud Weksteen858a9282021-01-12 12:02:37 +010022 target: {
23 darwin: {
24 enabled: false,
25 },
26 },
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080027 shared_libs: ["libcrypto"],
Victor Hsieh9a0ee7e2021-01-11 15:00:10 -080028 defaults: ["crosvm_defaults"],
Victor Hsieh1fe51c42020-11-05 11:08:10 -080029}
30
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080031// TODO(b/172687320): remove once there is a canonical bindgen.
32rust_bindgen {
33 name: "libauthfs_crypto_bindgen",
34 wrapper_src: "src/crypto.hpp",
35 crate_name: "authfs_crypto_bindgen",
36 source_stem: "bindings",
37 shared_libs: [
38 "libcrypto",
39 ],
40 bindgen_flags: ["--size_t-is-usize"],
41 cflags: ["-D BORINGSSL_NO_CXX"],
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080042}
43
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080044rust_binary {
45 name: "authfs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080046 defaults: ["authfs_defaults"],
47}
48
Victor Hsiehad46e0b2021-01-25 16:07:38 -080049rust_test {
50 name: "authfs_device_test_src_lib",
51 defaults: ["authfs_defaults"],
Victor Hsiehab293ee2021-01-29 17:28:25 -080052 test_suites: ["device-tests"],
Victor Hsiehfa4477a2021-02-08 10:51:50 -080053 data: [
54 "testdata/input.4k",
55 "testdata/input.4k.fsv_sig",
56 "testdata/input.4k.merkle_dump",
57 "testdata/input.4k1",
58 "testdata/input.4k1.fsv_sig",
59 "testdata/input.4k1.merkle_dump",
60 "testdata/input.4m",
61 "testdata/input.4m.fsv_sig",
62 "testdata/input.4m.merkle_dump",
63 "testdata/input.4m.merkle_dump.bad",
64 ],
Victor Hsiehad46e0b2021-01-25 16:07:38 -080065}