aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp10
-rw-r--r--patches/rules.mk.diff17
-rw-r--r--rules.mk11
3 files changed, 11 insertions, 27 deletions
diff --git a/Android.bp b/Android.bp
index 1089f61..720e5e1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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_serde_license"],
@@ -44,7 +46,7 @@ rust_library {
crate_name: "serde",
cargo_env_compat: true,
cargo_pkg_version: "1.0.158",
- srcs: ["src/lib.rs"],
+ crate_root: "src/lib.rs",
edition: "2015",
features: [
"default",
@@ -69,7 +71,7 @@ rust_test {
crate_name: "serde",
cargo_env_compat: true,
cargo_pkg_version: "1.0.158",
- srcs: ["src/lib.rs"],
+ crate_root: "src/lib.rs",
test_suites: ["general-tests"],
auto_gen_config: true,
test_options: {
@@ -91,7 +93,7 @@ rust_library_rlib {
crate_name: "serde",
cargo_env_compat: true,
cargo_pkg_version: "1.0.158",
- srcs: ["src/lib.rs"],
+ crate_root: "src/lib.rs",
edition: "2015",
features: [
"alloc",
diff --git a/patches/rules.mk.diff b/patches/rules.mk.diff
index 71d3386..019e2d9 100644
--- a/patches/rules.mk.diff
+++ b/patches/rules.mk.diff
@@ -1,8 +1,8 @@
diff --git a/rules.mk b/rules.mk
-index 442c6fc..986ff0d 100644
+index 442c6fc..6c64bf9 100644
--- a/rules.mk
+++ b/rules.mk
-@@ -13,9 +13,25 @@ MODULE_RUSTFLAGS += \
+@@ -13,9 +13,16 @@ MODULE_RUSTFLAGS += \
--cfg 'feature="default"' \
--cfg 'feature="derive"' \
--cfg 'feature="serde_derive"' \
@@ -11,20 +11,11 @@ index 442c6fc..986ff0d 100644
+
+MODULE_RUSTFLAGS += \
--cfg 'feature="std"' \
-
-+else
-+
-+# avoid cyclic dependence by adding dependencies manually
-+MODULE_ADD_IMPLICIT_DEPS := false
-+
-+MODULE_DEPS := \
-+ trusty/user/base/lib/libcore-rust/ \
-+ trusty/user/base/lib/libcompiler_builtins-rust/ \
-+
+
+endif
+
MODULE_LIBRARY_DEPS := \
+ trusty/user/base/lib/liballoc-rust \
external/rust/crates/serde_derive \
-
+
include make/library.mk
diff --git a/rules.mk b/rules.mk
index 140d8bc..13e25d7 100644
--- a/rules.mk
+++ b/rules.mk
@@ -1,4 +1,4 @@
-# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json.
+# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json --features .
# Do not modify this file as changes will be overridden on upgrade.
LOCAL_DIR := $(GET_LOCAL_DIR)
@@ -19,15 +19,6 @@ ifeq ($(call TOBOOL,$(TRUSTY_USERSPACE)),true)
MODULE_RUSTFLAGS += \
--cfg 'feature="std"' \
-else
-
-# avoid cyclic dependence by adding dependencies manually
-MODULE_ADD_IMPLICIT_DEPS := false
-
-MODULE_DEPS := \
- trusty/user/base/lib/libcore-rust/ \
- trusty/user/base/lib/libcompiler_builtins-rust/ \
-
endif
MODULE_LIBRARY_DEPS := \