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