Revert^2 "rules.mk: Enable spin feature for no_std use case"
This reverts commit 700accfd4b9b135521cdceaf66b8b34fa3006b74.
Reason for revert: Re-land once it works
Change-Id: I9e908ac26e4dbb2c1dc50413239449855a9662db
diff --git a/cargo_embargo.json b/cargo_embargo.json
index e32afad..5cbcf7d 100644
--- a/cargo_embargo.json
+++ b/cargo_embargo.json
@@ -30,6 +30,19 @@
"no_std": true
}
}
+ },
+ {
+ "generate_androidbp": false,
+ "generate_rulesmk": true,
+ "features": [
+ "spin",
+ "spin_no_std"
+ ],
+ "package": {
+ "lazy_static": {
+ "no_std": true
+ }
+ }
}
]
}
diff --git a/rules.mk b/rules.mk
index d685e85..fca012a 100644
--- a/rules.mk
+++ b/rules.mk
@@ -1,11 +1,22 @@
-# This file is generated by cargo2rulesmk.py --run.
-# Do not modify this file as changes will be overridden on upgrade.
+# This file is generated by cargo_embargo.
+# Do not modify this file after the LOCAL_DIR line
+# because the changes will be overridden on upgrade.
+# Content before the first line starting with LOCAL_DIR is preserved.
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
MODULE_CRATE_NAME := lazy_static
-MODULE_SRCS := \
- $(LOCAL_DIR)/src/lib.rs \
-
+MODULE_RUST_CRATE_TYPES := rlib
+MODULE_SRCS := $(LOCAL_DIR)/src/lib.rs
+MODULE_ADD_IMPLICIT_DEPS := false
MODULE_RUST_EDITION := 2015
+MODULE_RUSTFLAGS += \
+ --cfg 'feature="spin"' \
+ --cfg 'feature="spin_no_std"'
+
+MODULE_LIBRARY_DEPS := \
+ external/rust/crates/spin \
+ trusty/user/base/lib/libcompiler_builtins-rust \
+ trusty/user/base/lib/libcore-rust
+
include make/library.mk