aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-15 00:12:31 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-15 00:12:31 +0000
commit9a176a65ab33ba6b95f99f502a8c1a617074ec86 (patch)
treec414d08629a964e9414ece6bdfb52fa506ea6d6b
parent76f639ee41b247177e941008c000d973fd0e31c6 (diff)
parent48f97f3015c6f7110719fdd2f335c0f2bb547d5a (diff)
downloadlog-android14-qpr2-release.tar.gz
Change-Id: I26862222baaeff2bc42ebdaff47aa9042d669fc6
-rw-r--r--Android.bp32
-rw-r--r--android_impl.bp12
-rw-r--r--cargo2android.json18
-rw-r--r--cargo_embargo.json30
4 files changed, 56 insertions, 36 deletions
diff --git a/Android.bp b/Android.bp
index 81c9175..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,17 +59,17 @@ 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",
+ ],
+ },
+ },
}
rust_library_rlib {
@@ -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
new file mode 100644
index 0000000..d2f517a
--- /dev/null
+++ b/android_impl.bp
@@ -0,0 +1,12 @@
+target: {
+ 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 474419b..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "dependencies": true,
- "device": true,
- "min-sdk-version": "29",
- "run": 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/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
+ }
+ }
+ }
+ ]
+}