aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-26 23:53:31 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-26 23:53:31 +0000
commit2362d60fc20512703fd10546ea90cb561e78e67e (patch)
tree7b27ed82de6c291c67cae2d32fa106a41bbcba04
parent58768e6d376541325d30df4d22e45a06c54e0c64 (diff)
parent0069504377a016ac27019f91de38e435e7ac69cd (diff)
downloadlog-2362d60fc20512703fd10546ea90cb561e78e67e.tar.gz
Snap for 10214594 from 0069504377a016ac27019f91de38e435e7ac69cd to sdk-release
Change-Id: Ib6f225e1469ade896bd7a241f06f69da9f9f1dbe
-rw-r--r--Android.bp14
-rw-r--r--cargo2android.json14
-rw-r--r--cargo2android_nostd.bp21
3 files changed, 17 insertions, 32 deletions
diff --git a/Android.bp b/Android.bp
index 52b8f4f..e6ff3cf 100644
--- a/Android.bp
+++ b/Android.bp
@@ -62,9 +62,8 @@ rust_library {
min_sdk_version: "29",
}
-rust_library {
+rust_library_rlib {
name: "liblog_rust_nostd",
- host_supported: true,
crate_name: "log",
cargo_env_compat: true,
cargo_pkg_version: "0.4.17",
@@ -79,8 +78,15 @@ rust_library {
],
apex_available: [
"//apex_available:platform",
- "com.android.virt",
+ "//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
index f145d4c..474419b 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,18 +1,18 @@
{
- "add-toplevel-block": "cargo2android_nostd.bp",
- "apex-available": [
- "//apex_available:platform",
- "//apex_available:anyapex"
- ],
"dependencies": true,
"device": true,
- "features": "std",
"min-sdk-version": "29",
"run": true,
- "vendor-available": true,
"variants": [
{
+ "features": "std",
"suffix": "_rust"
+ },
+ {
+ "force-rlib": true,
+ "no-host": true,
+ "suffix": "_rust_nostd",
+ "no-std": true
}
]
} \ No newline at end of file
diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp
deleted file mode 100644
index e5ead1f..0000000
--- a/cargo2android_nostd.bp
+++ /dev/null
@@ -1,21 +0,0 @@
-rust_library {
- name: "liblog_rust_nostd",
- host_supported: true,
- crate_name: "log",
- cargo_env_compat: true,
- cargo_pkg_version: "0.4.17",
- srcs: ["src/lib.rs"],
- edition: "2015",
- cfgs: [
- "atomic_cas",
- "has_atomics",
- ],
- rustlibs: [
- "libcfg_if",
- ],
- apex_available: [
- "//apex_available:platform",
- "com.android.virt",
- ],
- min_sdk_version: "29",
-}