From 228d67a3e22eb5b3abce08d7e7b65bcba84ac440 Mon Sep 17 00:00:00 2001 From: Tejaswi Kallepalli Date: Mon, 11 Dec 2023 05:12:04 +0000 Subject: 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 --- cargo2rulesmk.json | 4 ++++ patches/rules.mk.diff | 14 ++++++++++++++ rules.mk | 20 ++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 cargo2rulesmk.json create mode 100644 patches/rules.mk.diff create mode 100644 rules.mk 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 -- cgit v1.2.3