diff options
author | Sergii Parubochyi <sergiip@google.com> | 2023-10-24 10:03:23 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-10-24 10:03:23 +0000 |
commit | 37713946ebacf42c23cf0d5f9436c6d68afc5d97 (patch) | |
tree | e4b39e013ea4fafe1f20308134f2fb6e4bb7ee24 | |
parent | 798edb48950ea3432b8d71a7b463a27d775a37a2 (diff) | |
parent | e6b0c58d23067dbd46538cb92a61a3dd1888d48c (diff) | |
download | untrusted-37713946ebacf42c23cf0d5f9436c6d68afc5d97.tar.gz |
Add condition for using std only for dylib am: 8892fec2cd am: 06225a0725 am: e6b0c58d23
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/untrusted/+/2797575
Change-Id: I98f0353af2e03c08c3f9c9b14cc07e634da73ebc
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. |