diff options
-rw-r--r-- | Android.bp | 20 | ||||
-rw-r--r-- | patches/std.diff | 14 | ||||
-rw-r--r-- | src/lib.rs | 3 |
3 files changed, 28 insertions, 9 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_ryu_license"], @@ -45,7 +47,7 @@ rust_library { crate_name: "ryu", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["src/lib.rs"], + crate_root: "src/lib.rs", edition: "2018", apex_available: [ "//apex_available:platform", @@ -61,7 +63,7 @@ rust_test { crate_name: "common_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/common_test.rs"], + crate_root: "tests/common_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { @@ -82,7 +84,7 @@ rust_test { crate_name: "d2s_intrinsics_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/d2s_intrinsics_test.rs"], + crate_root: "tests/d2s_intrinsics_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { @@ -103,7 +105,7 @@ rust_test { crate_name: "d2s_table_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/d2s_table_test.rs"], + crate_root: "tests/d2s_table_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { @@ -124,7 +126,7 @@ rust_test { crate_name: "d2s_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/d2s_test.rs"], + crate_root: "tests/d2s_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { @@ -145,7 +147,7 @@ rust_test { crate_name: "f2s_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/f2s_test.rs"], + crate_root: "tests/f2s_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { @@ -166,7 +168,7 @@ rust_test { crate_name: "s2d_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/s2d_test.rs"], + crate_root: "tests/s2d_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { @@ -187,7 +189,7 @@ rust_test { crate_name: "s2f_test", cargo_env_compat: true, cargo_pkg_version: "1.0.16", - srcs: ["tests/s2f_test.rs"], + crate_root: "tests/s2f_test.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { diff --git a/patches/std.diff b/patches/std.diff new file mode 100644 index 0000000..93ef036 --- /dev/null +++ b/patches/std.diff @@ -0,0 +1,14 @@ +diff --git a/src/lib.rs b/src/lib.rs +index cf3a732..83f6bdf 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -116,6 +116,9 @@ mod f2s; + mod f2s_intrinsics; + mod pretty; + ++#[cfg(android_dylib)] ++extern crate std; ++ + pub use crate::buffer::{Buffer, Float}; + + /// Unsafe functions that mirror the API of the C implementation of Ryū. @@ -116,6 +116,9 @@ mod f2s; mod f2s_intrinsics; mod pretty; +#[cfg(android_dylib)] +extern crate std; + pub use crate::buffer::{Buffer, Float}; /// Unsafe functions that mirror the API of the C implementation of Ryū. |