aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-11-17 20:37:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-17 20:37:46 +0000
commit39ae0da33c911743c0128b7a11805481e21bfafb (patch)
tree78ee8048f5d966e3f2f018f63c2a055f8555dba6
parent86675ac08c173a68ba0c67002403d80c3f31cf22 (diff)
parent5f5dd649c1ec1eecf642d3c17b5022c1890a3c54 (diff)
downloadzerocopy-39ae0da33c911743c0128b7a11805481e21bfafb.tar.gz
Migrate to cargo_embargo. am: 5f5dd649c1
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/zerocopy/+/2836073 Change-Id: If04dfa4caa168faffd07be3d5a07148650baac6c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp14
-rw-r--r--cargo2android.json27
-rw-r--r--cargo_embargo.json50
3 files changed, 54 insertions, 37 deletions
diff --git a/Android.bp b/Android.bp
index f2971e4..b632469 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 {
@@ -32,9 +32,7 @@ rust_library {
"simd",
"zerocopy-derive",
],
- rustlibs: [
- "libbyteorder",
- ],
+ rustlibs: ["libbyteorder"],
proc_macros: ["libzerocopy_derive"],
apex_available: [
"//apex_available:platform",
@@ -58,9 +56,7 @@ rust_library_rlib {
"simd",
"zerocopy-derive",
],
- rustlibs: [
- "libbyteorder_nostd",
- ],
+ rustlibs: ["libbyteorder_nostd"],
proc_macros: ["libzerocopy_derive"],
apex_available: [
"//apex_available:platform",
@@ -90,9 +86,7 @@ rust_library_rlib {
"simd",
"zerocopy-derive",
],
- rustlibs: [
- "libbyteorder_nostd",
- ],
+ rustlibs: ["libbyteorder_nostd"],
proc_macros: ["libzerocopy_derive"],
apex_available: [
"//apex_available:platform",
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index 68d4eaf..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "device": true,
- "run": true,
- "features": "derive,byteorder,simd",
- "variants": [
- {
- "tests": false
- },
- {
- "alloc": true,
- "dependency-suffix": "_nostd",
- "features": "alloc,derive,byteorder,simd",
- "force-rlib": true,
- "no-host": true,
- "suffix": "_nostd",
- "no-std": true
- },
- {
- "dependency-suffix": "_nostd",
- "features": "derive,byteorder,simd",
- "force-rlib": true,
- "no-host": true,
- "suffix": "_nostd_noalloc",
- "no-std": true
- }
- ]
-}
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..a61e4b9
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,50 @@
+{
+ "run_cargo": false,
+ "variants": [
+ {
+ "features": [
+ "derive",
+ "byteorder",
+ "simd"
+ ]
+ },
+ {
+ "features": [
+ "alloc",
+ "derive",
+ "byteorder",
+ "simd"
+ ],
+ "module_name_overrides": {
+ "libbyteorder": "libbyteorder_nostd",
+ "libzerocopy": "libzerocopy_nostd"
+ },
+ "package": {
+ "zerocopy": {
+ "alloc": true,
+ "force_rlib": true,
+ "host_supported": false,
+ "no_std": true
+ }
+ }
+ },
+ {
+ "features": [
+ "derive",
+ "byteorder",
+ "simd"
+ ],
+ "module_name_overrides": {
+ "libbyteorder": "libbyteorder_nostd",
+ "libzerocopy": "libzerocopy_nostd_noalloc"
+ },
+ "package": {
+ "zerocopy": {
+ "force_rlib": true,
+ "host_supported": false,
+ "no_std": true
+ }
+ }
+ }
+ ]
+}