aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-11-14 19:44:53 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-14 19:44:53 +0000
commitcf241c9e512a2f85bd440f50639ff224f7e98bf2 (patch)
treec414d08629a964e9414ece6bdfb52fa506ea6d6b
parent470d806eebc3c505f2471b7ef4521612b5ccafbf (diff)
parentb25ed83af464ce1ea79bf7014d5adf1d068fc634 (diff)
downloadlog-cf241c9e512a2f85bd440f50639ff224f7e98bf2.tar.gz
Migrate to cargo_embargo. am: b25ed83af4
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/log/+/2828094 Change-Id: Iab4ca60e9daef642cc384296426575287c8ada9a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp30
-rw-r--r--android_impl.bp20
-rw-r--r--cargo2android.json19
-rw-r--r--cargo_embargo.json30
4 files changed, 53 insertions, 46 deletions
diff --git a/Android.bp b/Android.bp
index b6b435b..a068a9f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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 {
@@ -50,9 +50,7 @@ rust_library {
"atomic_cas",
"has_atomics",
],
- rustlibs: [
- "libcfg_if",
- ],
+ rustlibs: ["libcfg_if"],
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
@@ -61,16 +59,16 @@ rust_library {
vendor_available: true,
min_sdk_version: "29",
target: {
- android: {
- cfgs: ["default_log_impl"],
- rustlibs: [
- "libandroid_log_sys",
- "libonce_cell",
- ],
- shared_libs: [
- "liblog",
- ],
- }
+ android: {
+ cfgs: ["default_log_impl"],
+ rustlibs: [
+ "libandroid_log_sys",
+ "libonce_cell",
+ ],
+ shared_libs: [
+ "liblog",
+ ],
+ },
},
}
@@ -85,9 +83,7 @@ rust_library_rlib {
"atomic_cas",
"has_atomics",
],
- rustlibs: [
- "libcfg_if",
- ],
+ rustlibs: ["libcfg_if"],
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
diff --git a/android_impl.bp b/android_impl.bp
index 77d8833..d2f517a 100644
--- a/android_impl.bp
+++ b/android_impl.bp
@@ -1,12 +1,12 @@
target: {
- android: {
- cfgs: ["default_log_impl"],
- rustlibs: [
- "libandroid_log_sys",
- "libonce_cell",
- ],
- shared_libs: [
- "liblog",
- ],
- }
+ android: {
+ cfgs: ["default_log_impl"],
+ rustlibs: [
+ "libandroid_log_sys",
+ "libonce_cell",
+ ],
+ shared_libs: [
+ "liblog",
+ ],
+ }
} \ No newline at end of file
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index 2e29872..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "dependencies": true,
- "device": true,
- "min-sdk-version": "29",
- "run": true,
- "variants": [
- {
- "features": "std",
- "suffix": "_rust",
- "add-module-block": "android_impl.bp"
- },
- {
- "force-rlib": true,
- "no-host": true,
- "suffix": "_rust_nostd",
- "no-std": true
- }
- ]
-} \ No newline at end of file
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..cdf2faf
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,30 @@
+{
+ "min_sdk_version": "29",
+ "variants": [
+ {
+ "features": [
+ "std"
+ ],
+ "module_name_overrides": {
+ "liblog": "liblog_rust"
+ },
+ "package": {
+ "log": {
+ "add_module_block": "android_impl.bp"
+ }
+ }
+ },
+ {
+ "module_name_overrides": {
+ "liblog": "liblog_rust_nostd"
+ },
+ "package": {
+ "log": {
+ "force_rlib": true,
+ "host_supported": false,
+ "no_std": true
+ }
+ }
+ }
+ ]
+}