Bob Badour | 2efc476 | 2021-02-03 18:36:27 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 5 | rust_defaults { |
| 6 | name: "authfs_defaults", |
| 7 | crate_name: "authfs", |
| 8 | srcs: [ |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 9 | "src/main.rs", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 10 | ], |
| 11 | edition: "2018", |
| 12 | rustlibs: [ |
Victor Hsieh | f01f323 | 2020-12-11 13:31:31 -0800 | [diff] [blame] | 13 | "authfs_aidl_interface-rust", |
Victor Hsieh | ec18456 | 2020-11-06 13:50:31 -0800 | [diff] [blame] | 14 | "libanyhow", |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 15 | "libauthfs_crypto_bindgen", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 16 | "libcfg_if", |
| 17 | "libfuse_rust", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 18 | "liblibc", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 19 | "libstructopt", |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 20 | "libthiserror", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 21 | ], |
ThiƩbaud Weksteen | 858a928 | 2021-01-12 12:02:37 +0100 | [diff] [blame] | 22 | target: { |
| 23 | darwin: { |
| 24 | enabled: false, |
| 25 | }, |
| 26 | }, |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 27 | shared_libs: ["libcrypto"], |
Victor Hsieh | 9a0ee7e | 2021-01-11 15:00:10 -0800 | [diff] [blame] | 28 | defaults: ["crosvm_defaults"], |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 29 | } |
| 30 | |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 31 | // TODO(b/172687320): remove once there is a canonical bindgen. |
| 32 | rust_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 Hsieh | 573c649 | 2021-03-11 14:19:18 -0800 | [diff] [blame] | 42 | apex_available: ["com.android.virt"], |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 43 | } |
| 44 | |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 45 | rust_binary { |
| 46 | name: "authfs", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 47 | defaults: ["authfs_defaults"], |
Victor Hsieh | 573c649 | 2021-03-11 14:19:18 -0800 | [diff] [blame] | 48 | apex_available: ["com.android.virt"], |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 49 | } |
| 50 | |
Victor Hsieh | ad46e0b | 2021-01-25 16:07:38 -0800 | [diff] [blame] | 51 | rust_test { |
| 52 | name: "authfs_device_test_src_lib", |
| 53 | defaults: ["authfs_defaults"], |
Victor Hsieh | ab293ee | 2021-01-29 17:28:25 -0800 | [diff] [blame] | 54 | test_suites: ["device-tests"], |
Victor Hsieh | fa4477a | 2021-02-08 10:51:50 -0800 | [diff] [blame] | 55 | data: [ |
| 56 | "testdata/input.4k", |
| 57 | "testdata/input.4k.fsv_sig", |
| 58 | "testdata/input.4k.merkle_dump", |
| 59 | "testdata/input.4k1", |
| 60 | "testdata/input.4k1.fsv_sig", |
| 61 | "testdata/input.4k1.merkle_dump", |
| 62 | "testdata/input.4m", |
| 63 | "testdata/input.4m.fsv_sig", |
| 64 | "testdata/input.4m.merkle_dump", |
| 65 | "testdata/input.4m.merkle_dump.bad", |
| 66 | ], |
Victor Hsieh | ad46e0b | 2021-01-25 16:07:38 -0800 | [diff] [blame] | 67 | } |