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 | 9d0ab62 | 2021-04-26 17:07:02 -0700 | [diff] [blame] | 14 | "libandroid_logger", |
Victor Hsieh | ec18456 | 2020-11-06 13:50:31 -0800 | [diff] [blame] | 15 | "libanyhow", |
Inseob Kim | c0886c2 | 2021-12-13 17:41:24 +0900 | [diff] [blame] | 16 | "libauthfs_fsverity_metadata", |
Victor Hsieh | 2445e33 | 2021-06-04 16:44:53 -0700 | [diff] [blame] | 17 | "libbinder_rpc_unstable_bindgen", |
| 18 | "libbinder_rs", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 19 | "libcfg_if", |
Victor Hsieh | 9978257 | 2022-01-05 15:38:33 -0800 | [diff] [blame] | 20 | "libfsverity_digests_proto_rust", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 21 | "libfuse_rust", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 22 | "liblibc", |
Victor Hsieh | 9d0ab62 | 2021-04-26 17:07:02 -0700 | [diff] [blame] | 23 | "liblog_rust", |
Victor Hsieh | f393a72 | 2021-12-08 13:04:27 -0800 | [diff] [blame] | 24 | "libnix", |
Andrew Scull | 761db1e | 2022-05-23 18:31:35 +0000 | [diff] [blame] | 25 | "libopenssl", |
Victor Hsieh | 9978257 | 2022-01-05 15:38:33 -0800 | [diff] [blame] | 26 | "libprotobuf", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 27 | "libstructopt", |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 28 | "libthiserror", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 29 | ], |
Victor Hsieh | b50e0fa | 2021-06-04 15:09:57 -0700 | [diff] [blame] | 30 | prefer_rlib: true, |
ThiƩbaud Weksteen | 858a928 | 2021-01-12 12:02:37 +0100 | [diff] [blame] | 31 | target: { |
| 32 | darwin: { |
| 33 | enabled: false, |
| 34 | }, |
| 35 | }, |
Victor Hsieh | 2445e33 | 2021-06-04 16:44:53 -0700 | [diff] [blame] | 36 | shared_libs: [ |
Victor Hsieh | 2445e33 | 2021-06-04 16:44:53 -0700 | [diff] [blame] | 37 | "libbinder_rpc_unstable", |
| 38 | ], |
Victor Hsieh | 9a0ee7e | 2021-01-11 15:00:10 -0800 | [diff] [blame] | 39 | defaults: ["crosvm_defaults"], |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 40 | } |
| 41 | |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 42 | rust_binary { |
| 43 | name: "authfs", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 44 | defaults: ["authfs_defaults"], |
Victor Hsieh | 573c649 | 2021-03-11 14:19:18 -0800 | [diff] [blame] | 45 | apex_available: ["com.android.virt"], |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 46 | } |
| 47 | |
Victor Hsieh | ad46e0b | 2021-01-25 16:07:38 -0800 | [diff] [blame] | 48 | rust_test { |
| 49 | name: "authfs_device_test_src_lib", |
| 50 | defaults: ["authfs_defaults"], |
Jiyong Park | 5c71cac | 2022-02-04 11:49:31 +0900 | [diff] [blame] | 51 | test_suites: ["general-tests"], |
Victor Hsieh | 85b4f73 | 2021-03-09 16:02:14 -0800 | [diff] [blame] | 52 | data: [":authfs_test_files"], |
| 53 | } |
| 54 | |
| 55 | filegroup { |
| 56 | name: "authfs_test_files", |
| 57 | srcs: [ |
| 58 | "testdata/cert.der", |
Victor Hsieh | fa4477a | 2021-02-08 10:51:50 -0800 | [diff] [blame] | 59 | "testdata/input.4k", |
Inseob Kim | c0886c2 | 2021-12-13 17:41:24 +0900 | [diff] [blame] | 60 | "testdata/input.4k.fsv_meta", |
Victor Hsieh | fa4477a | 2021-02-08 10:51:50 -0800 | [diff] [blame] | 61 | "testdata/input.4k1", |
Inseob Kim | c0886c2 | 2021-12-13 17:41:24 +0900 | [diff] [blame] | 62 | "testdata/input.4k1.fsv_meta", |
Victor Hsieh | fa4477a | 2021-02-08 10:51:50 -0800 | [diff] [blame] | 63 | "testdata/input.4m", |
Inseob Kim | c0886c2 | 2021-12-13 17:41:24 +0900 | [diff] [blame] | 64 | "testdata/input.4m.fsv_meta", |
| 65 | "testdata/input.4m.fsv_meta.bad_merkle", |
Victor Hsieh | fa4477a | 2021-02-08 10:51:50 -0800 | [diff] [blame] | 66 | ], |
Victor Hsieh | ad46e0b | 2021-01-25 16:07:38 -0800 | [diff] [blame] | 67 | } |