Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 1 | rust_defaults { |
| 2 | name: "authfs_defaults", |
| 3 | crate_name: "authfs", |
| 4 | srcs: [ |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 5 | "src/main.rs", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 6 | ], |
| 7 | edition: "2018", |
| 8 | rustlibs: [ |
Victor Hsieh | ec18456 | 2020-11-06 13:50:31 -0800 | [diff] [blame] | 9 | "libanyhow", |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 10 | "libauthfs_crypto_bindgen", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 11 | "libcfg_if", |
| 12 | "libfuse_rust", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 13 | "liblibc", |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 14 | "libstructopt", |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 15 | "libthiserror", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 16 | ], |
| 17 | host_supported: true, |
ThiƩbaud Weksteen | 858a928 | 2021-01-12 12:02:37 +0100 | [diff] [blame] | 18 | target: { |
| 19 | darwin: { |
| 20 | enabled: false, |
| 21 | }, |
| 22 | }, |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 23 | shared_libs: ["libcrypto"], |
Victor Hsieh | 9a0ee7e | 2021-01-11 15:00:10 -0800 | [diff] [blame] | 24 | defaults: ["crosvm_defaults"], |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 25 | } |
| 26 | |
Victor Hsieh | d1cb0d7 | 2020-11-06 13:49:55 -0800 | [diff] [blame] | 27 | // TODO(b/172687320): remove once there is a canonical bindgen. |
| 28 | rust_bindgen { |
| 29 | name: "libauthfs_crypto_bindgen", |
| 30 | wrapper_src: "src/crypto.hpp", |
| 31 | crate_name: "authfs_crypto_bindgen", |
| 32 | source_stem: "bindings", |
| 33 | shared_libs: [ |
| 34 | "libcrypto", |
| 35 | ], |
| 36 | bindgen_flags: ["--size_t-is-usize"], |
| 37 | cflags: ["-D BORINGSSL_NO_CXX"], |
| 38 | host_supported: true, |
| 39 | } |
| 40 | |
Victor Hsieh | 88ac6ca | 2020-11-13 15:20:24 -0800 | [diff] [blame] | 41 | rust_binary { |
| 42 | name: "authfs", |
Victor Hsieh | 1fe51c4 | 2020-11-05 11:08:10 -0800 | [diff] [blame] | 43 | defaults: ["authfs_defaults"], |
| 44 | } |
| 45 | |
| 46 | rust_test_host { |
| 47 | name: "authfs_host_test_src_lib", |
| 48 | test_suites: ["general-tests"], |
| 49 | defaults: ["authfs_defaults"], |
| 50 | } |
| 51 | |
| 52 | // TODO(victorhsieh): Enable the test once "undefined symbol: _Unwind_Resume" is fixed, then add to |
| 53 | // TEST_MAPPING. |
| 54 | //rust_test { |
| 55 | // name: "authfs_device_test_src_lib", |
| 56 | // defaults: ["authfs_defaults"], |
| 57 | //} |