aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-10-24 23:14:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-10-24 23:14:25 +0000
commitfeb9b68ca1af9f7ad1625f7fcf39813516566e22 (patch)
treee4b39e013ea4fafe1f20308134f2fb6e4bb7ee24
parentc579f21be43f390a79c20c40986a2f7b8f8bc6fc (diff)
parent8892fec2cdc9e09795522ba1c007fa78b12f881c (diff)
downloaduntrusted-feb9b68ca1af9f7ad1625f7fcf39813516566e22.tar.gz
Snap for 10998794 from 8892fec2cdc9e09795522ba1c007fa78b12f881c to sdk-release
Change-Id: If9b92dc1dfc1d4f71a34d96d79beb1c8d20a4104
-rw-r--r--patches/std.diff3
-rw-r--r--src/untrusted.rs3
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.