blob: 27fc01f9799fdee869ecbf374ec7ec0bea0aa501 [file] [log] [blame]
---
src/lib.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git b/src/lib.rs a/src/lib.rs
index 28119967..4faa975b 100644
--- b/src/lib.rs
+++ a/src/lib.rs
@@ -1,7 +1,8 @@
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![deny(warnings)]
-#![cfg_attr(not(test), no_std)]
+// ANDROID: Use std to allow building as a dylib.
+#![cfg_attr(not(any(test, android_dylib)), no_std)]
//! A light-weight lock guarded by an atomic boolean.
//!
@@ -43,7 +44,8 @@
//! assert_eq!(locked2.name, "Spanner Bundle");
//! ```
-#[cfg(test)]
+// ANDROID: Use std to allow building as a dylib.
+#[cfg(any(test, android_dylib))]
extern crate core;
use core::cell::UnsafeCell;