Support building all variants.
Bug: 143217452
Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs
Change-Id: I8f1aab2880b18eb756cb050af7479ba97c4577f9
diff --git a/Android.bp b/Android.bp
index ba70c15..cbfe764 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,9 +1,9 @@
// This file is generated by cargo2android.py --run --device.
-rust_library_rlib {
+rust_library {
name: "libproc_macro_nested",
- host_supported: true,
crate_name: "proc_macro_nested",
+ host_supported: true,
srcs: ["src/lib.rs"],
edition: "2015",
}
diff --git a/src/lib.rs b/src/lib.rs
index 529ee4a..91089e0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -40,6 +40,9 @@
#![no_std]
+// ANDROID: Use std to allow building as a dylib.
+extern crate std;
+
// ANDROID: count.rs generated and put in the out subdirectory.
// include!(concat!(env!("OUT_DIR"), "/count.rs"));
include!("../out/count.rs");