1
2---
3 src/lib.rs | 6 ++++--
4 1 file changed, 4 insertions(+), 2 deletions(-)
5
6diff --git b/src/lib.rs a/src/lib.rs
7index 28119967..4faa975b 100644
8--- b/src/lib.rs
9+++ a/src/lib.rs
10@@ -1,7 +1,8 @@
11 #![deny(missing_docs)]
12 #![deny(missing_debug_implementations)]
13 #![deny(warnings)]
14-#![cfg_attr(not(test), no_std)]
15+// ANDROID: Use std to allow building as a dylib.
16+#![cfg_attr(not(any(test, android_dylib)), no_std)]
17
18 //! A light-weight lock guarded by an atomic boolean.
19 //!
20@@ -43,7 +44,8 @@
21 //! assert_eq!(locked2.name, "Spanner Bundle");
22 //! ```
23
24-#[cfg(test)]
25+// ANDROID: Use std to allow building as a dylib.
26+#[cfg(any(test, android_dylib))]
27 extern crate core;
28
29 use core::cell::UnsafeCell;
30