uefi-raw: Add no_std variant
The uefi_raw 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 libuefi_raw_nostd
Change-Id: I695e1306cbb10edea170f6273f6c3438bb5e6f03
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..72bf3c7
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,40 @@
+// 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_uefi-raw_license"],
+ default_team: "trendy_team_android_rust",
+}
+
+license {
+ name: "external_rust_crates_uefi-raw_license",
+ visibility: [":__subpackages__"],
+ license_kinds: ["SPDX-license-identifier-MPL-2.0"],
+ license_text: ["LICENSE"],
+}
+
+rust_library_rlib {
+ name: "libuefi_raw_nostd",
+ crate_name: "uefi_raw",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.9.0",
+ crate_root: "src/lib.rs",
+ edition: "2021",
+ rustlibs: [
+ "libbitflags",
+ "libptr_meta_nostd",
+ "libuguid_nostd",
+ ],
+ 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..5dd7165
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,15 @@
+{
+ "run_cargo": false,
+ "module_name_overrides": {
+ "libuefi_raw": "libuefi_raw_nostd",
+ "libuguid": "libuguid_nostd",
+ "libptr_meta": "libptr_meta_nostd"
+ },
+ "package": {
+ "uefi-raw": {
+ "force_rlib": true,
+ "host_supported": false,
+ "no_std": true
+ }
+ }
+}