diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-10 15:40:53 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-10 15:40:53 +0000 |
commit | 0bfc49c32c720622ee6bd21cd7dc7be93a70042d (patch) | |
tree | 71247fcc1bf753b6077c0f445198815275b5b24f | |
parent | 528ae6f846b3debc6f7e3989dd660f24fc0f5a56 (diff) | |
parent | 805adc4c23ce0ec651133ae5073d71dc134c24e6 (diff) | |
download | lazy_static-busytown-mac-infra-release.tar.gz |
Snap for 11819167 from 805adc4c23ce0ec651133ae5073d71dc134c24e6 to busytown-mac-infra-releasebusytown-mac-infra-release
Change-Id: I66eb3402f30edff23833174e9fbdbaad9951a4e1
-rw-r--r-- | Android.bp | 40 | ||||
-rw-r--r-- | cargo2android.json | 17 | ||||
-rw-r--r-- | cargo_embargo.json | 35 | ||||
-rw-r--r-- | rules.mk | 11 |
4 files changed, 78 insertions, 25 deletions
@@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --config cargo2android.json. +// This file is generated by cargo_embargo. // Do not modify this file as changes will be overridden on upgrade. package { @@ -39,9 +39,8 @@ license { rust_test { name: "lazy_static_test_tests_test", - // has rustc warnings host_supported: true, - crate_name: "lazy_static", + crate_name: "test", cargo_env_compat: true, cargo_pkg_version: "1.4.0", srcs: ["tests/test.rs"], @@ -51,14 +50,11 @@ rust_test { unit_test: true, }, edition: "2015", - rustlibs: [ - "liblazy_static", - ], + rustlibs: ["liblazy_static"], } rust_library { name: "liblazy_static", - // has rustc warnings host_supported: true, crate_name: "lazy_static", cargo_env_compat: true, @@ -67,8 +63,36 @@ rust_library { edition: "2015", apex_available: [ "//apex_available:platform", - "//apex_available:anyapex" + "//apex_available:anyapex", + ], + product_available: true, + 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/cargo2android.json b/cargo2android.json deleted file mode 100644 index 2cb1e3d..0000000 --- a/cargo2android.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "apex-available": [ - "//apex_available:platform", - "//apex_available:anyapex" - ], - "dependency-blocklist": [ - "doc_comment" - ], - "device": true, - "min-sdk-version": "29", - "run": true, - "test-blocklist": [ - "tests/no_std.rs" - ], - "tests": true, - "vendor-available": true -} diff --git a/cargo_embargo.json b/cargo_embargo.json new file mode 100644 index 0000000..e32afad --- /dev/null +++ b/cargo_embargo.json @@ -0,0 +1,35 @@ +{ + "min_sdk_version": "29", + "module_blocklist": [ + "lazy_static_test_tests_no_std" + ], + "package": { + "lazy_static": { + "dep_blocklist": [ + "libdoc_comment" + ] + } + }, + "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 + } + } + } + ] +} diff --git a/rules.mk b/rules.mk new file mode 100644 index 0000000..d685e85 --- /dev/null +++ b/rules.mk @@ -0,0 +1,11 @@ +# This file is generated by cargo2rulesmk.py --run. +# Do not modify this file as changes will be overridden on upgrade. + +LOCAL_DIR := $(GET_LOCAL_DIR) +MODULE := $(LOCAL_DIR) +MODULE_CRATE_NAME := lazy_static +MODULE_SRCS := \ + $(LOCAL_DIR)/src/lib.rs \ + +MODULE_RUST_EDITION := 2015 +include make/library.mk |