diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-26 07:10:03 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-26 07:10:03 +0000 |
commit | 1fb83e2bbf3758ab377c2f2354185e0c505c0ef8 (patch) | |
tree | b9d5ec5e5fc12ea9350d3c9f5ada22931b3c487b | |
parent | d2f9964fc66e00be5ba29ead460336bb506a62cd (diff) | |
parent | 000f46e7d9b70dd91b371ee27a4a63643c1a7571 (diff) | |
download | oorandom-busytown-mac-infra-release.tar.gz |
Snap for 11878398 from 000f46e7d9b70dd91b371ee27a4a63643c1a7571 to busytown-mac-infra-releasebusytown-mac-infra-release
Change-Id: Ic832305effd6eed65621414787fc4c7d54c9028c
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | patches/std.diff | 14 | ||||
-rw-r--r-- | src/lib.rs | 3 |
3 files changed, 21 insertions, 2 deletions
@@ -1,5 +1,7 @@ // This file is generated by cargo_embargo. -// Do not modify this file as changes will be overridden on upgrade. +// Do not modify this file after the first "rust_*" or "genrule" module +// because the changes will be overridden on upgrade. +// Content before the first "rust_*" or "genrule" module is preserved. package { default_applicable_licenses: ["external_rust_crates_oorandom_license"], @@ -24,7 +26,7 @@ rust_library { crate_name: "oorandom", cargo_env_compat: true, cargo_pkg_version: "11.1.3", - srcs: ["src/lib.rs"], + crate_root: "src/lib.rs", edition: "2018", apex_available: [ "//apex_available:platform", diff --git a/patches/std.diff b/patches/std.diff new file mode 100644 index 0000000..4524081 --- /dev/null +++ b/patches/std.diff @@ -0,0 +1,14 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 8196950..f77d0b1 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -22,6 +22,9 @@ + #![no_std] + use core::ops::Range; + ++#[cfg(android_dylib)] ++extern crate std; ++ + /// A PRNG producing a 32-bit output. + /// + /// The current implementation is `PCG-XSH-RR`. @@ -22,6 +22,9 @@ #![no_std] use core::ops::Range; +#[cfg(android_dylib)] +extern crate std; + /// A PRNG producing a 32-bit output. /// /// The current implementation is `PCG-XSH-RR`. |