libs: Move cstr!() into its own crate
Make the macro host_supported, for unittests.
This overshadows the homonymous crate from crates.io [1] but importing
and depending on an external crate for <10 lines of code seems overkill.
[1]: https://crates.io/crates/cstr
Bug: 308694211
Test: atest libcstr.tests
Test: m libcstr
Test: m pvmfw_bin rialto_bin vmbase_example_bin
Change-Id: If1bf37034fc004a380b3ba528b9d76393a865d3e
diff --git a/libs/libfdt/Android.bp b/libs/libfdt/Android.bp
index b889ee5..5920d5d 100644
--- a/libs/libfdt/Android.bp
+++ b/libs/libfdt/Android.bp
@@ -37,6 +37,7 @@
"libcore.rust_sysroot",
],
rustlibs: [
+ "libcstr",
"liblibfdt_bindgen",
"libzerocopy_nostd",
],
@@ -61,6 +62,7 @@
],
prefer_rlib: true,
rustlibs: [
+ "libcstr",
"liblibfdt",
],
}