Support building all variants. am: fe7c85d0eb am: 66a0fff168 am: 2a1557899e am: 46f0e2c0c0
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/proc-macro-nested/+/1355988
Change-Id: I9f022d21f535cf440ce2c1d3eda87243e9514eb5
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");