diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:54:11 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:54:11 +0000 |
commit | 0c5b0e405c5d0b31eadb79e3bdb83f19ed7f7f0a (patch) | |
tree | 31ad1d3e82d4db3b019aa81fa63e3c71786ca8e7 | |
parent | 58b10f2bcaee58bab920b55bd3393078c4caeb3f (diff) | |
parent | 91207e55f6d8999de4813b220981a2631bf08a6e (diff) | |
download | ciborium-io-android14-mainline-media-release.tar.gz |
Snap for 10453563 from 91207e55f6d8999de4813b220981a2631bf08a6e to mainline-media-releaseaml_med_341711000aml_med_341619000aml_med_341513600aml_med_341312300aml_med_341312020aml_med_341111000aml_med_341011000aml_med_340922010android14-mainline-media-release
Change-Id: Icd34466706595cb7ee3d30e05a7126c41bb9797e
-rw-r--r-- | Android.bp | 29 | ||||
-rw-r--r-- | TEST_MAPPING | 16 | ||||
-rw-r--r-- | cargo2android.json | 4 | ||||
-rw-r--r-- | cargo2android_nostd.bp | 20 | ||||
-rw-r--r-- | patches/std.diff | 3 | ||||
-rw-r--r-- | src/lib.rs | 2 |
6 files changed, 63 insertions, 11 deletions
@@ -1,8 +1,6 @@ // This file is generated by cargo2android.py --config cargo2android.json. // Do not modify this file as changes will be overridden on upgrade. - - package { default_applicable_licenses: ["external_rust_crates_ciborium-io_license"], } @@ -32,4 +30,31 @@ rust_library { "alloc", "std", ], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], + product_available: true, + vendor_available: true, +} + +rust_library_rlib { + name: "libciborium_io_nostd", + crate_name: "ciborium_io", + cargo_env_compat: true, + cargo_pkg_version: "0.2.0", + srcs: ["src/lib.rs"], + edition: "2021", + features: ["alloc"], + prefer_rlib: true, + no_stdlibs: true, + stdlibs: [ + "liballoc.rust_sysroot", + "libcompiler_builtins.rust_sysroot", + "libcore.rust_sysroot", + ], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], } diff --git a/TEST_MAPPING b/TEST_MAPPING index 2f7de78..fe37418 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -1,13 +1,17 @@ // Generated by update_crate_tests.py for tests that depend on this crate. { - "presubmit": [ + "imports": [ { - "name": "libcert_request_validator_tests" - } - ], - "presubmit-rust": [ + "path": "external/rust/crates/ciborium-ll" + }, + { + "path": "external/rust/crates/coset" + }, + { + "path": "system/keymint/derive" + }, { - "name": "libcert_request_validator_tests" + "path": "system/keymint/hal" } ] } diff --git a/cargo2android.json b/cargo2android.json index 479f52f..eb19901 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,6 +1,8 @@ { + "add-toplevel-block": "cargo2android_nostd.bp", "device": true, "features": "alloc,std,", "run": true, - "dependencies": true + "dependencies": true, + "vendor-available": true } diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp new file mode 100644 index 0000000..9712ce9 --- /dev/null +++ b/cargo2android_nostd.bp @@ -0,0 +1,20 @@ +rust_library_rlib { + name: "libciborium_io_nostd", + crate_name: "ciborium_io", + cargo_env_compat: true, + cargo_pkg_version: "0.2.0", + srcs: ["src/lib.rs"], + edition: "2021", + features: ["alloc"], + prefer_rlib: true, + no_stdlibs: true, + stdlibs: [ + "liballoc.rust_sysroot", + "libcompiler_builtins.rust_sysroot", + "libcore.rust_sysroot", + ], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], +} diff --git a/patches/std.diff b/patches/std.diff index fcb2329..d27ac7c 100644 --- a/patches/std.diff +++ b/patches/std.diff @@ -5,7 +5,8 @@ index c887e19..0594e8c 100644 @@ -19,6 +19,8 @@ #![deny(clippy::all)] #![deny(clippy::cargo)] - + - + +#[cfg(android_dylib)] +extern crate std; + #[cfg(feature = "alloc")] @@ -18,7 +18,7 @@ #![deny(missing_docs)] #![deny(clippy::all)] #![deny(clippy::cargo)] - +#[cfg(android_dylib)] extern crate std; #[cfg(feature = "alloc")] |