aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-11-14 20:41:57 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-14 20:41:57 +0000
commitf2a2bd22ce8aafe47df20f69b4b72b8822c3ff42 (patch)
tree844ee2157e5b3f316f75f240afd2005305603718
parentc13bade9b0ea01c2dd71673665011a68a55733a1 (diff)
parent17c785e114dc625a82885ff4cc64d299351a9200 (diff)
downloadproc-macro2-f2a2bd22ce8aafe47df20f69b4b72b8822c3ff42.tar.gz
Migrate to cargo_embargo. am: 17c785e114emu-34-3-release
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/proc-macro2/+/2830192 Change-Id: I6e2416871d1df28526dbc04915980f22ce6ebec4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp140
-rw-r--r--cargo2android.json6
-rw-r--r--cargo_embargo.json13
3 files changed, 132 insertions, 27 deletions
diff --git a/Android.bp b/Android.bp
index ab29b5f..fb14fd3 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 {
@@ -54,19 +54,21 @@ rust_library_host {
"span_locations",
"wrap_proc_macro",
],
- rustlibs: [
- "libunicode_ident",
- ],
+ rustlibs: ["libunicode_ident"],
compile_multilib: "first",
}
-rust_defaults {
- name: "proc-macro2_test_defaults",
- crate_name: "proc_macro2",
+rust_test_host {
+ name: "proc-macro2_test_tests_comments",
+ crate_name: "comments",
cargo_env_compat: true,
cargo_pkg_version: "1.0.69",
+ srcs: ["tests/comments.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2021",
features: [
"default",
@@ -87,55 +89,151 @@ rust_defaults {
}
rust_test_host {
- name: "proc-macro2_test_tests_comments",
- defaults: ["proc-macro2_test_defaults"],
- srcs: ["tests/comments.rs"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test_host {
name: "proc-macro2_test_tests_features",
- defaults: ["proc-macro2_test_defaults"],
+ crate_name: "features",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.69",
srcs: ["tests/features.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2021",
+ features: [
+ "default",
+ "proc-macro",
+ "span-locations",
+ ],
+ cfgs: [
+ "proc_macro_span",
+ "span_locations",
+ "wrap_proc_macro",
+ ],
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libunicode_ident",
+ ],
+ proc_macros: ["librustversion"],
}
rust_test_host {
name: "proc-macro2_test_tests_marker",
- defaults: ["proc-macro2_test_defaults"],
+ crate_name: "marker",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.69",
srcs: ["tests/marker.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2021",
+ features: [
+ "default",
+ "proc-macro",
+ "span-locations",
+ ],
+ cfgs: [
+ "proc_macro_span",
+ "span_locations",
+ "wrap_proc_macro",
+ ],
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libunicode_ident",
+ ],
+ proc_macros: ["librustversion"],
}
rust_test_host {
name: "proc-macro2_test_tests_test",
- defaults: ["proc-macro2_test_defaults"],
+ crate_name: "test",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.69",
srcs: ["tests/test.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2021",
+ features: [
+ "default",
+ "proc-macro",
+ "span-locations",
+ ],
+ cfgs: [
+ "proc_macro_span",
+ "span_locations",
+ "wrap_proc_macro",
+ ],
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libunicode_ident",
+ ],
+ proc_macros: ["librustversion"],
}
rust_test_host {
name: "proc-macro2_test_tests_test_fmt",
- defaults: ["proc-macro2_test_defaults"],
+ crate_name: "test_fmt",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.69",
srcs: ["tests/test_fmt.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2021",
+ features: [
+ "default",
+ "proc-macro",
+ "span-locations",
+ ],
+ cfgs: [
+ "proc_macro_span",
+ "span_locations",
+ "wrap_proc_macro",
+ ],
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libunicode_ident",
+ ],
+ proc_macros: ["librustversion"],
}
rust_test_host {
name: "proc-macro2_test_tests_test_size",
- defaults: ["proc-macro2_test_defaults"],
+ crate_name: "test_size",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.69",
srcs: ["tests/test_size.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2021",
+ features: [
+ "default",
+ "proc-macro",
+ "span-locations",
+ ],
+ cfgs: [
+ "proc_macro_span",
+ "span_locations",
+ "wrap_proc_macro",
+ ],
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libunicode_ident",
+ ],
+ proc_macros: ["librustversion"],
}
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index 45a2954..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "features": "default,span-locations",
- "host-first-multilib": true,
- "run": true,
- "tests": true
-} \ No newline at end of file
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..a64c9e4
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,13 @@
+{
+ "features": [
+ "default",
+ "span-locations"
+ ],
+ "package": {
+ "proc-macro2": {
+ "device_supported": false,
+ "host_first_multilib": true
+ }
+ },
+ "tests": true
+}