aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-23 00:14:49 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-23 00:14:49 +0000
commitaac8d54159812eddfaeab1c0ab23cd23cee9b06d (patch)
tree106e0ea99972697122caf4608d4d5c3b5b092a68
parent74666bdf7d119c387632e6a7e258255deb75ec8e (diff)
parent2498eae50598c78b805d467fa67518c858442c76 (diff)
downloadtinyvec-android14-qpr2-s1-release.tar.gz
Change-Id: Id187fd79e02ae474962d95f4e0dde531de5e8a86
-rw-r--r--Android.bp89
-rw-r--r--cargo2android.json19
-rw-r--r--cargo_embargo.json31
3 files changed, 81 insertions, 58 deletions
diff --git a/Android.bp b/Android.bp
index 2155d28..1393a8b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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
+ }
+ }
+ }
+ ]
+}