2021-02-04 02:36:27 +00:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
2020-11-05 19:08:10 +00:00
|
|
|
rust_defaults {
|
|
|
|
name: "authfs_defaults",
|
|
|
|
crate_name: "authfs",
|
|
|
|
srcs: [
|
2020-11-13 23:20:24 +00:00
|
|
|
"src/main.rs",
|
2020-11-05 19:08:10 +00:00
|
|
|
],
|
|
|
|
edition: "2018",
|
|
|
|
rustlibs: [
|
2020-12-11 21:31:31 +00:00
|
|
|
"authfs_aidl_interface-rust",
|
2021-04-27 00:07:02 +00:00
|
|
|
"libandroid_logger",
|
2020-11-06 21:50:31 +00:00
|
|
|
"libanyhow",
|
2020-11-06 21:49:55 +00:00
|
|
|
"libauthfs_crypto_bindgen",
|
2021-12-13 08:41:24 +00:00
|
|
|
"libauthfs_fsverity_metadata",
|
2021-06-04 23:44:53 +00:00
|
|
|
"libbinder_rpc_unstable_bindgen",
|
|
|
|
"libbinder_rs",
|
2020-11-13 23:20:24 +00:00
|
|
|
"libcfg_if",
|
2022-01-05 23:38:33 +00:00
|
|
|
"libfsverity_digests_proto_rust",
|
2020-11-13 23:20:24 +00:00
|
|
|
"libfuse_rust",
|
2020-11-05 19:08:10 +00:00
|
|
|
"liblibc",
|
2021-04-27 00:07:02 +00:00
|
|
|
"liblog_rust",
|
2021-12-08 21:04:27 +00:00
|
|
|
"libnix",
|
2022-01-05 23:38:33 +00:00
|
|
|
"libprotobuf",
|
2020-11-13 23:20:24 +00:00
|
|
|
"libstructopt",
|
2020-11-06 21:49:55 +00:00
|
|
|
"libthiserror",
|
2020-11-05 19:08:10 +00:00
|
|
|
],
|
2021-06-04 22:09:57 +00:00
|
|
|
prefer_rlib: true,
|
2021-01-12 11:02:37 +00:00
|
|
|
target: {
|
|
|
|
darwin: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2021-06-04 23:44:53 +00:00
|
|
|
shared_libs: [
|
|
|
|
"libcrypto",
|
|
|
|
"libbinder_rpc_unstable",
|
|
|
|
],
|
2021-01-11 23:00:10 +00:00
|
|
|
defaults: ["crosvm_defaults"],
|
2020-11-05 19:08:10 +00:00
|
|
|
}
|
|
|
|
|
2020-11-06 21:49:55 +00:00
|
|
|
// TODO(b/172687320): remove once there is a canonical bindgen.
|
|
|
|
rust_bindgen {
|
|
|
|
name: "libauthfs_crypto_bindgen",
|
|
|
|
wrapper_src: "src/crypto.hpp",
|
|
|
|
crate_name: "authfs_crypto_bindgen",
|
|
|
|
source_stem: "bindings",
|
|
|
|
shared_libs: [
|
|
|
|
"libcrypto",
|
|
|
|
],
|
|
|
|
bindgen_flags: ["--size_t-is-usize"],
|
|
|
|
cflags: ["-D BORINGSSL_NO_CXX"],
|
2021-03-11 22:19:18 +00:00
|
|
|
apex_available: ["com.android.virt"],
|
2020-11-06 21:49:55 +00:00
|
|
|
}
|
|
|
|
|
2020-11-13 23:20:24 +00:00
|
|
|
rust_binary {
|
|
|
|
name: "authfs",
|
2020-11-05 19:08:10 +00:00
|
|
|
defaults: ["authfs_defaults"],
|
2021-03-11 22:19:18 +00:00
|
|
|
apex_available: ["com.android.virt"],
|
2020-11-05 19:08:10 +00:00
|
|
|
}
|
|
|
|
|
2021-01-26 00:07:38 +00:00
|
|
|
rust_test {
|
|
|
|
name: "authfs_device_test_src_lib",
|
|
|
|
defaults: ["authfs_defaults"],
|
2022-02-04 02:49:31 +00:00
|
|
|
test_suites: ["general-tests"],
|
2021-03-10 00:02:14 +00:00
|
|
|
data: [":authfs_test_files"],
|
|
|
|
}
|
|
|
|
|
|
|
|
filegroup {
|
|
|
|
name: "authfs_test_files",
|
|
|
|
srcs: [
|
|
|
|
"testdata/cert.der",
|
2021-02-08 18:51:50 +00:00
|
|
|
"testdata/input.4k",
|
2021-12-13 08:41:24 +00:00
|
|
|
"testdata/input.4k.fsv_meta",
|
2021-02-08 18:51:50 +00:00
|
|
|
"testdata/input.4k1",
|
2021-12-13 08:41:24 +00:00
|
|
|
"testdata/input.4k1.fsv_meta",
|
2021-02-08 18:51:50 +00:00
|
|
|
"testdata/input.4m",
|
2021-12-13 08:41:24 +00:00
|
|
|
"testdata/input.4m.fsv_meta",
|
|
|
|
"testdata/input.4m.fsv_meta.bad_merkle",
|
2021-02-08 18:51:50 +00:00
|
|
|
],
|
2021-01-26 00:07:38 +00:00
|
|
|
}
|
2021-08-23 20:45:39 +00:00
|
|
|
|
|
|
|
rust_test {
|
|
|
|
name: "libauthfs_crypto_bindgen_test",
|
|
|
|
srcs: [":libauthfs_crypto_bindgen"],
|
|
|
|
crate_name: "authfs_crypto_bindgen_test",
|
|
|
|
test_suites: ["general-tests"],
|
|
|
|
auto_gen_config: true,
|
|
|
|
clippy_lints: "none",
|
|
|
|
lints: "none",
|
|
|
|
}
|