diff options
author | Andrew Walbran <qwandor@google.com> | 2023-11-22 19:13:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-11-22 19:13:41 +0000 |
commit | 1459b07ed6908c5af9c9e0aacf4b2d894c659691 (patch) | |
tree | 106e0ea99972697122caf4608d4d5c3b5b092a68 | |
parent | 74666bdf7d119c387632e6a7e258255deb75ec8e (diff) | |
parent | 5b547eecc9c3b444925dc3dc73e1c0de90901d9e (diff) | |
download | tinyvec-1459b07ed6908c5af9c9e0aacf4b2d894c659691.tar.gz |
Migrate to cargo_embargo. am: ae392e9d1a am: 262e772f4c am: 5b547eecc9
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2833293
Change-Id: Iec0c073712184358d25bc7f8a573222b5fd0cef2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 89 | ||||
-rw-r--r-- | cargo2android.json | 19 | ||||
-rw-r--r-- | cargo_embargo.json | 31 |
3 files changed, 81 insertions, 58 deletions
@@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --config cargo2android.json. +// This file is generated by cargo_embargo. // Do not modify this file as changes will be overridden on upgrade. package { @@ -53,9 +53,7 @@ rust_library { "std", "tinyvec_macros", ], - rustlibs: [ - "libtinyvec_macros", - ], + rustlibs: ["libtinyvec_macros"], apex_available: [ "//apex_available:platform", "//apex_available:anyapex", @@ -65,35 +63,46 @@ rust_library { min_sdk_version: "29", } -rust_library_rlib { - name: "libtinyvec_nostd", - crate_name: "tinyvec", +rust_test { + name: "tinyvec_test_tests_arrayvec", + host_supported: true, + crate_name: "arrayvec", cargo_env_compat: true, cargo_pkg_version: "1.6.0", - srcs: ["src/lib.rs"], + srcs: ["tests/arrayvec.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, + test_options: { + unit_test: true, + }, edition: "2018", - apex_available: [ - "//apex_available:platform", - "//apex_available:anyapex", + features: [ + "alloc", + "default", + "std", + "tinyvec_macros", ], - prefer_rlib: true, - no_stdlibs: true, - stdlibs: [ - "libcompiler_builtins.rust_sysroot", - "libcore.rust_sysroot", + rustlibs: [ + "libcriterion", + "libserde_test", + "libsmallvec", + "libtinyvec", + "libtinyvec_macros", ], - product_available: true, - vendor_available: true, - min_sdk_version: "29", } -rust_defaults { - name: "tinyvec_test_defaults", +rust_test { + name: "tinyvec_test_tests_tinyvec", + host_supported: true, crate_name: "tinyvec", cargo_env_compat: true, cargo_pkg_version: "1.6.0", + srcs: ["tests/tinyvec.rs"], test_suites: ["general-tests"], auto_gen_config: true, + test_options: { + unit_test: true, + }, edition: "2018", features: [ "alloc", @@ -110,22 +119,24 @@ rust_defaults { ], } -rust_test { - name: "tinyvec_test_tests_arrayvec", - defaults: ["tinyvec_test_defaults"], - host_supported: true, - srcs: ["tests/arrayvec.rs"], - test_options: { - unit_test: true, - }, -} - -rust_test { - name: "tinyvec_test_tests_tinyvec", - defaults: ["tinyvec_test_defaults"], - host_supported: true, - srcs: ["tests/tinyvec.rs"], - test_options: { - unit_test: true, - }, +rust_library_rlib { + name: "libtinyvec_nostd", + crate_name: "tinyvec", + cargo_env_compat: true, + cargo_pkg_version: "1.6.0", + srcs: ["src/lib.rs"], + edition: "2018", + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], + prefer_rlib: true, + no_stdlibs: true, + stdlibs: [ + "libcompiler_builtins.rust_sysroot", + "libcore.rust_sysroot", + ], + product_available: true, + vendor_available: true, + min_sdk_version: "29", } diff --git a/cargo2android.json b/cargo2android.json deleted file mode 100644 index d3ea6e6..0000000 --- a/cargo2android.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "dependencies": true, - "device": true, - "min-sdk-version": "29", - "run": true, - "variants": [ - { - "features": "alloc,default,std,tinyvec_macros", - "tests": true - }, - { - "features": "", - "force-rlib": true, - "no-host": true, - "suffix": "_nostd", - "no-std": true - } - ] -}
\ No newline at end of file diff --git a/cargo_embargo.json b/cargo_embargo.json new file mode 100644 index 0000000..f7826ad --- /dev/null +++ b/cargo_embargo.json @@ -0,0 +1,31 @@ +{ + "min_sdk_version": "29", + "module_blocklist": [ + "tinyvec_test_src_lib" + ], + "run_cargo": false, + "variants": [ + { + "features": [ + "alloc", + "default", + "std", + "tinyvec_macros" + ], + "tests": true + }, + { + "features": [], + "module_name_overrides": { + "libtinyvec": "libtinyvec_nostd" + }, + "package": { + "tinyvec": { + "force_rlib": true, + "host_supported": false, + "no_std": true + } + } + } + ] +} |