aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHasini Gunasinghe <hasinitg@google.com>2022-05-19 15:38:04 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-05-19 15:38:04 +0000
commit51fe992c945fc3fe00396fcb5bed026e9e700965 (patch)
tree36f779c2efb7e7a01cd1544bc91ea42afabf6e22
parent558b05aab9389da1cbdd7f19676dcd841fd2e573 (diff)
parentb8d1a747d48fa8e08eaf73c735377081ac3f7c0b (diff)
downloadunicode-xid-51fe992c945fc3fe00396fcb5bed026e9e700965.tar.gz
Restrict the import of std crate to dylib only. am: b8d1a747d4
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/unicode-xid/+/2098651 Change-Id: I7a2ad110cb5ec5fcad299cfbc15051967a9134ab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--patches/std.diff1
-rw-r--r--src/lib.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/patches/std.diff b/patches/std.diff
index 73141c0..8237bc9 100644
--- a/patches/std.diff
+++ b/patches/std.diff
@@ -11,6 +11,7 @@ index 01c81e2..927fc9a 100644
+// #[cfg(test)]
+// ANDROID: Unconditionally use std to allow building as a dylib.
+// #[macro_use]
++#[cfg(android_dylib)]
extern crate std;
#[cfg(feature = "bench")]
diff --git a/src/lib.rs b/src/lib.rs
index 012124f..b4d5a1a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -40,6 +40,7 @@
// #[cfg(test)]
// ANDROID: Unconditionally use std to allow building as a dylib.
// #[macro_use]
+#[cfg(android_dylib)]
extern crate std;
#[cfg(feature = "bench")]