diff options
author | Sergii Parubochyi <sergiip@google.com> | 2023-11-22 23:50:16 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-11-22 23:50:16 +0000 |
commit | 3eeab251707668337784419690f7a2aace148c6c (patch) | |
tree | f54867e657572ec2467ad84e4cf9c73826ccb70b | |
parent | 2c717ca6f9d702dd8ace75f0a6b3d12ff0107580 (diff) | |
parent | 9174a122cfb6702ee7bfbe98b83fc9eec78c2dfe (diff) | |
download | lazy_static-3eeab251707668337784419690f7a2aace148c6c.tar.gz |
Add 'no_std' variant for 'lazy_static'. am: e72d1326c6 am: 9174a122cf
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/lazy_static/+/2842794
Change-Id: Ib06e3048f090e9de60d37b9bdcfec48934c8fd1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 27 | ||||
-rw-r--r-- | cargo_embargo.json | 23 |
2 files changed, 49 insertions, 1 deletions
@@ -69,3 +69,30 @@ rust_library { vendor_available: true, min_sdk_version: "29", } + +rust_library_rlib { + name: "liblazy_static_nostd", + crate_name: "lazy_static", + cargo_env_compat: true, + cargo_pkg_version: "1.4.0", + srcs: ["src/lib.rs"], + edition: "2015", + features: [ + "spin", + "spin_no_std", + ], + rustlibs: ["libspin_nostd"], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], + prefer_rlib: true, + no_stdlibs: true, + stdlibs: [ + "libcompiler_builtins.rust_sysroot", + "libcore.rust_sysroot", + ], + product_available: true, + vendor_available: true, + min_sdk_version: "29", +} diff --git a/cargo_embargo.json b/cargo_embargo.json index 8902785..e32afad 100644 --- a/cargo_embargo.json +++ b/cargo_embargo.json @@ -10,5 +10,26 @@ ] } }, - "tests": true + "variants": [ + { + "tests": true + }, + { + "features": [ + "spin", + "spin_no_std" + ], + "module_name_overrides": { + "liblazy_static": "liblazy_static_nostd", + "libspin": "libspin_nostd" + }, + "package": { + "lazy_static": { + "force_rlib": true, + "host_supported": false, + "no_std": true + } + } + } + ] } |