diff options
author | Sergii Parubochyi <sergiip@google.com> | 2023-10-24 08:23:28 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-10-24 08:23:28 +0000 |
commit | 06225a072557a2391ce1ae97d895d0a8109e3a84 (patch) | |
tree | e4b39e013ea4fafe1f20308134f2fb6e4bb7ee24 | |
parent | e15dca304040fc66b498e05c69954cd5ccff04e5 (diff) | |
parent | 8892fec2cdc9e09795522ba1c007fa78b12f881c (diff) | |
download | untrusted-06225a072557a2391ce1ae97d895d0a8109e3a84.tar.gz |
Add condition for using std only for dylib am: 8892fec2cd
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/untrusted/+/2797575
Change-Id: I1f77ffe02254ce0f5842e45ebba0856d9916003a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | patches/std.diff | 3 | ||||
-rw-r--r-- | src/untrusted.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/patches/std.diff b/patches/std.diff index e3ebe5e..9d110cc 100644 --- a/patches/std.diff +++ b/patches/std.diff @@ -6,7 +6,8 @@ index 2f88bb4..b9f1439 100644 )] #![no_std] -+// ANDROID: Unconditionally use std to allow building as a dylib. ++// ANDROID: use std to allow building as a dylib. ++#[cfg(android_dylib)] +extern crate std; + /// A wrapper around `&'a [u8]` that helps in writing panic-free code. diff --git a/src/untrusted.rs b/src/untrusted.rs index 5071fdd..47c281e 100644 --- a/src/untrusted.rs +++ b/src/untrusted.rs @@ -105,7 +105,8 @@ #![allow(rustdoc::bare_urls)] #![no_std] -// ANDROID: Unconditionally use std to allow building as a dylib. +// ANDROID: use std to allow building as a dylib. +#[cfg(android_dylib)] extern crate std; /// A wrapper around `&'a [u8]` that helps in writing panic-free code. |