diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-08 00:15:22 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-08 00:15:22 +0000 |
commit | b10ff175534d5920e686ab19017d2504f832dc5f (patch) | |
tree | 41c4263ae6fb03213e0c14cb171dcc976f4bd846 | |
parent | 77bd9f31401116b21611b88ed04dbee9fede1674 (diff) | |
parent | 630e65a949d9d1c1cd13b15d1adaff788d55ea25 (diff) | |
download | ring-b10ff175534d5920e686ab19017d2504f832dc5f.tar.gz |
Snap for 11066218 from 630e65a949d9d1c1cd13b15d1adaff788d55ea25 to sdk-release
Change-Id: I62957512780ee78267c2e352540e6d0c9414c4d8
-rw-r--r-- | Android.bp | 34 | ||||
-rw-r--r-- | cargo2android.json | 12 | ||||
-rw-r--r-- | patches/Android.bp.patch | 22 |
3 files changed, 65 insertions, 3 deletions
@@ -69,6 +69,40 @@ rust_library { min_sdk_version: "29", } +rust_library_rlib { + name: "libring_nostd", + // has rustc warnings + crate_name: "ring", + cargo_env_compat: true, + cargo_pkg_version: "0.17.0-alpha.11", + srcs: ["src/lib.rs"], + edition: "2018", + features: ["once_cell"], + rustlibs: [ + "liblibc", + "libonce_cell", + "libspin_nostd", + "libuntrusted", + ], + whole_static_libs: [ + "libring-core", + "libring-test", + ], + apex_available: [ + "//apex_available:platform", + "com.android.resolv", + ], + prefer_rlib: true, + no_stdlibs: true, + stdlibs: [ + "libcompiler_builtins.rust_sysroot", + "libcore.rust_sysroot", + ], + product_available: true, + vendor_available: true, + min_sdk_version: "29", +} + rust_test { name: "ring_test_src_lib", // has rustc warnings diff --git a/cargo2android.json b/cargo2android.json index ae417f7..e7b015e 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -14,5 +14,17 @@ "whole-static-libs": [ "ring-core", "ring-test" + ], + "variants": [ + {}, + { + "no-host": true, + "suffix": "_nostd", + "no-std": true, + "alloc": false, + "force-rlib": true, + "features": "once_cell", + "tests": false + } ] } diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch index 5bbfbe8..9e02f93 100644 --- a/patches/Android.bp.patch +++ b/patches/Android.bp.patch @@ -1,5 +1,5 @@ diff --git a/Android.bp b/Android.bp -index 2fffd32fb..eb06e7878 100644 +index 9690d3d..9c28b81 100644 --- a/Android.bp +++ b/Android.bp @@ -56,9 +56,9 @@ rust_library { @@ -15,7 +15,24 @@ index 2fffd32fb..eb06e7878 100644 ], apex_available: [ "//apex_available:platform", -@@ -94,9 +94,9 @@ rust_test { +@@ -82,12 +80,12 @@ rust_library_rlib { + rustlibs: [ + "liblibc", + "libonce_cell", +- "libspin", ++ "libspin_nostd", + "libuntrusted", + ], +- static_libs: [ +- "libring_core_0_17_0_alpha_11_", +- "libring_core_0_17_0_alpha_11_test", ++ whole_static_libs: [ ++ "libring-core", ++ "libring-test", + ], + apex_available: [ + "//apex_available:platform", +@@ -131,9 +129,9 @@ rust_test { "libspin", "libuntrusted", ], @@ -27,4 +44,3 @@ index 2fffd32fb..eb06e7878 100644 + "libring-test", ], } - |