Generate rules.mk for x509-certs with cargo_embargo
Adjust cargo_embargo.json and run cargo_embargo.
Bug: 367477170
Test: build.py generic-x86_64-test --skip-tests
Change-Id: I53c83e7323abf3a29d27d3367e15417a0718c963
diff --git a/crates/x509-cert/cargo_embargo.json b/crates/x509-cert/cargo_embargo.json
index a36fc1f..baf2120 100644
--- a/crates/x509-cert/cargo_embargo.json
+++ b/crates/x509-cert/cargo_embargo.json
@@ -29,6 +29,16 @@
"no_std": true
}
}
+ },
+ {
+ "package": {
+ "x509-cert": {
+ "alloc": true,
+ "no_std": true
+ }
+ },
+ "generate_androidbp": false,
+ "generate_rulesmk": true
}
]
}
diff --git a/crates/x509-cert/rules.mk b/crates/x509-cert/rules.mk
index 060b15c..0e9f8d1 100644
--- a/crates/x509-cert/rules.mk
+++ b/crates/x509-cert/rules.mk
@@ -1,20 +1,21 @@
-# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json --features .
-# 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 := x509_cert
-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 := 2021
-MODULE_RUSTFLAGS += \
- --cfg 'feature="alloc"' \
-
MODULE_LIBRARY_DEPS := \
- external/rust/crates/const-oid \
- external/rust/crates/der \
- external/rust/crates/flagset \
- external/rust/crates/spki \
+ $(call FIND_CRATE,const-oid) \
+ $(call FIND_CRATE,der) \
+ $(call FIND_CRATE,spki) \
+ trusty/user/base/lib/liballoc-rust \
+ trusty/user/base/lib/libcompiler_builtins-rust \
+ trusty/user/base/lib/libcore-rust
include make/library.mk