ptr_meta: Add no_std variant
The ptr_meta no_std variant will be used for the uefi no_std dependency.
Use cargo_embargo tool to generate the Android.bp file.
cargo_embargo generate cargo_embargo.json
Test: m libptr_meta_nostd
Change-Id: I5469ca484e58ee846ac82d8982553947e3a7d62c
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..054cebc
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,36 @@
+// This file is generated by cargo_embargo.
+// Do not modify this file because the changes will be overridden on upgrade.
+
+package {
+ default_applicable_licenses: ["external_rust_crates_ptr_meta_license"],
+ default_team: "trendy_team_android_rust",
+}
+
+license {
+ name: "external_rust_crates_ptr_meta_license",
+ visibility: [":__subpackages__"],
+ license_kinds: ["SPDX-license-identifier-MIT"],
+ license_text: ["LICENSE"],
+}
+
+rust_library_rlib {
+ name: "libptr_meta_nostd",
+ crate_name: "ptr_meta",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.0",
+ crate_root: "src/lib.rs",
+ edition: "2018",
+ proc_macros: ["libptr_meta_derive"],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "libcompiler_builtins.rust_sysroot",
+ "libcore.rust_sysroot",
+ ],
+ product_available: true,
+ vendor_available: true,
+}
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..bc00c72
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,14 @@
+{
+ "run_cargo": false,
+ "features": [],
+ "module_name_overrides": {
+ "libptr_meta": "libptr_meta_nostd"
+ },
+ "package": {
+ "ptr_meta": {
+ "force_rlib": true,
+ "host_supported": false,
+ "no_std": true
+ }
+ }
+}