aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejaswi Kallepalli <tkallepalli@google.com>2023-12-11 05:12:04 +0000
committerTejaswi Kallepalli <tkallepalli@google.com>2023-12-14 02:32:00 +0000
commit228d67a3e22eb5b3abce08d7e7b65bcba84ac440 (patch)
treeaef2f758edb9a79dff6828dcfc8e67aa6082ad7a
parent462fbe50c8d61b43b541dc3faad215c08b0edf05 (diff)
downloadzerocopy-228d67a3e22eb5b3abce08d7e7b65bcba84ac440.tar.gz
Add autogenerated Trusty rules.mk
Generate rules.mk for zerocopy using cargo2rulesmk.py script. Bug: 314703810 Test: secdma rust Change-Id: I918061597a5cf5c0985acab30534a7f707188153 Signed-off-by: Tejaswi Kallepalli <tkallepalli@google.com>
-rw-r--r--cargo2rulesmk.json4
-rw-r--r--patches/rules.mk.diff14
-rw-r--r--rules.mk20
3 files changed, 38 insertions, 0 deletions
diff --git a/cargo2rulesmk.json b/cargo2rulesmk.json
new file mode 100644
index 0000000..d14b910
--- /dev/null
+++ b/cargo2rulesmk.json
@@ -0,0 +1,4 @@
+{
+ "features": "default,derive",
+ "patch": "patches/rules.mk.diff"
+}
diff --git a/patches/rules.mk.diff b/patches/rules.mk.diff
new file mode 100644
index 0000000..ecea77e
--- /dev/null
+++ b/patches/rules.mk.diff
@@ -0,0 +1,14 @@
+diff --git a/rules.mk b/rules.mk
+index 05e4383..9e71d6d 100644
+--- a/rules.mk
++++ b/rules.mk
+@@ -8,8 +8,8 @@ MODULE_SRCS := \
+ $(LOCAL_DIR)/src/lib.rs \
+
+ MODULE_RUST_EDITION := 2018
++# TODO(b/316076550): Remove rules.mk patch when cargo2rulesmk.py is fixed
+ MODULE_RUSTFLAGS += \
+- --cfg 'feature="byteorder"' \
+ --cfg 'feature="default"' \
+ --cfg 'feature="derive"' \
+ --cfg 'feature="zerocopy-derive"' \
diff --git a/rules.mk b/rules.mk
new file mode 100644
index 0000000..9e71d6d
--- /dev/null
+++ b/rules.mk
@@ -0,0 +1,20 @@
+# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json.
+# Do not modify this file as changes will be overridden on upgrade.
+
+LOCAL_DIR := $(GET_LOCAL_DIR)
+MODULE := $(LOCAL_DIR)
+MODULE_CRATE_NAME := zerocopy
+MODULE_SRCS := \
+ $(LOCAL_DIR)/src/lib.rs \
+
+MODULE_RUST_EDITION := 2018
+# TODO(b/316076550): Remove rules.mk patch when cargo2rulesmk.py is fixed
+MODULE_RUSTFLAGS += \
+ --cfg 'feature="default"' \
+ --cfg 'feature="derive"' \
+ --cfg 'feature="zerocopy-derive"' \
+
+MODULE_LIBRARY_DEPS := \
+ external/rust/crates/zerocopy-derive \
+
+include make/library.mk