diff options
-rw-r--r-- | Android.bp | 10 | ||||
-rw-r--r-- | cargo2rulesmk.json | 2 | ||||
-rw-r--r-- | rules.mk | 2 |
3 files changed, 9 insertions, 5 deletions
@@ -1,5 +1,7 @@ // This file is generated by cargo_embargo. -// Do not modify this file as changes will be overridden on upgrade. +// Do not modify this file after the first "rust_*" or "genrule" module +// because the changes will be overridden on upgrade. +// Content before the first "rust_*" or "genrule" module is preserved. package { default_applicable_licenses: ["external_rust_crates_zerocopy_license"], @@ -24,7 +26,7 @@ rust_library { crate_name: "zerocopy", cargo_env_compat: true, cargo_pkg_version: "0.7.29", - srcs: ["src/lib.rs"], + crate_root: "src/lib.rs", edition: "2018", features: [ "byteorder", @@ -47,7 +49,7 @@ rust_library_rlib { crate_name: "zerocopy", cargo_env_compat: true, cargo_pkg_version: "0.7.29", - srcs: ["src/lib.rs"], + crate_root: "src/lib.rs", edition: "2018", features: [ "alloc", @@ -78,7 +80,7 @@ rust_library_rlib { crate_name: "zerocopy", cargo_env_compat: true, cargo_pkg_version: "0.7.29", - srcs: ["src/lib.rs"], + crate_root: "src/lib.rs", edition: "2018", features: [ "byteorder", diff --git a/cargo2rulesmk.json b/cargo2rulesmk.json index f305cd2..a9e982a 100644 --- a/cargo2rulesmk.json +++ b/cargo2rulesmk.json @@ -1,3 +1,3 @@ { - "features": "default,derive" + "features": "default,derive,alloc" } @@ -9,12 +9,14 @@ MODULE_SRCS := \ MODULE_RUST_EDITION := 2018 MODULE_RUSTFLAGS += \ + --cfg 'feature="alloc"' \ --cfg 'feature="byteorder"' \ --cfg 'feature="default"' \ --cfg 'feature="derive"' \ --cfg 'feature="zerocopy-derive"' \ MODULE_LIBRARY_DEPS := \ + $(call FIND_CRATE,liballoc) \ external/rust/crates/byteorder \ external/rust/crates/zerocopy-derive \ |