diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-15 21:45:04 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-15 21:45:04 +0000 |
commit | edf474c77a1e40a1305e6658227344929842ffb7 (patch) | |
tree | b0755ac8734eb839b21b791286cc6f7d2b4a610a | |
parent | 50d067c45f5a75feb4f252939655ffa0f41c9bc6 (diff) | |
parent | cb7d3504eb32cbb9d94e210d71064ffd3a139e2a (diff) | |
download | proc-macro-nested-aml_tz3_314012070.tar.gz |
Snap for 8730993 from cb7d3504eb32cbb9d94e210d71064ffd3a139e2a to mainline-tzdata3-releaseaml_tz3_314012070aml_tz3_314012050aml_tz3_314012010aml_tz3_313110000aml_tz3_312511020aml_tz3_312511010aml_tz3_312410020aml_tz3_312410010android12-mainline-tzdata3-releaseaml_tz3_314012010
Change-Id: Ie1c32dc90fe42402e518361718911299461c511d
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 28 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | TEST_MAPPING | 11 | ||||
-rw-r--r-- | build.rs | 8 | ||||
-rw-r--r-- | cargo2android.json | 5 | ||||
-rw-r--r-- | out/count.rs | 4 | ||||
-rw-r--r-- | patches/std.diff (renamed from patches/std_env.diff) | 6 |
10 files changed, 51 insertions, 27 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 80f1df4..f40cd7e 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "0d6c7a078176d77e3fc8911c00bf4bb06d3ba9bd" + "sha1": "8a3cec3cfc7b8417ef8cc2970f7de27ff2b6a023" } } @@ -50,8 +50,6 @@ rust_library { name: "libproc_macro_nested", host_supported: true, crate_name: "proc_macro_nested", - cargo_env_compat: true, - cargo_pkg_version: "0.1.7", srcs: [ "src/lib.rs", ":copy_proc-macro-nested_build_out", @@ -59,9 +57,33 @@ rust_library { edition: "2015", apex_available: [ "//apex_available:platform", - "com.android.bluetooth", "com.android.resolv", "com.android.virt", ], min_sdk_version: "29", } + +rust_defaults { + name: "proc-macro-nested_defaults", + crate_name: "proc_macro_nested", + srcs: [ + "src/lib.rs", + ":copy_proc-macro-nested_build_out", + ], + test_suites: ["general-tests"], + auto_gen_config: true, + edition: "2015", +} + +rust_test_host { + name: "proc-macro-nested_host_test_src_lib", + defaults: ["proc-macro-nested_defaults"], + test_options: { + unit_test: true, + }, +} + +rust_test { + name: "proc-macro-nested_device_test_src_lib", + defaults: ["proc-macro-nested_defaults"], +} @@ -12,7 +12,7 @@ [package] name = "proc-macro-nested" -version = "0.1.7" +version = "0.1.6" authors = ["David Tolnay <dtolnay@gmail.com>"] description = "Support for nested proc-macro-hack invocations" license = "MIT OR Apache-2.0" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index aa306db..fd0fa99 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "proc-macro-nested" -version = "0.1.7" +version = "0.1.6" authors = ["David Tolnay <dtolnay@gmail.com>"] license = "MIT OR Apache-2.0" description = "Support for nested proc-macro-hack invocations" @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/proc-macro-nested/proc-macro-nested-0.1.7.crate" + value: "https://static.crates.io/crates/proc-macro-nested/proc-macro-nested-0.1.6.crate" } - version: "0.1.7" + version: "0.1.6" license_type: NOTICE last_upgrade_date { - year: 2021 - month: 6 - day: 16 + year: 2020 + month: 7 + day: 10 } } diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..0cba459 --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,11 @@ +// Generated by cargo2android.py for tests in Android.bp +{ + "presubmit": [ + { + "name": "proc-macro-nested_device_test_src_lib" + }, + { + "name": "futures-util_device_test_src_lib" + } + ] +} @@ -1,7 +1,7 @@ use std::env; use std::fs; use std::iter; -use std::path::{self, Path}; +use std::path::Path; /* #[doc(hidden)] @@ -27,9 +27,7 @@ fn main() { content += &format!(" ({}) => {{ proc_macro_call_{}!() }};\n", bangs, i); } content += " ($(!)+) => {\n"; - content += " compile_error! {\n"; - content += " \"this macro does not support >64 nested macro invocations\"\n"; - content += " }\n"; + content += " compile_error! { \"this macro does not support >64 nested macro invocations\" }\n"; content += " };\n"; content += "}\n"; @@ -45,6 +43,4 @@ fn main() { { fs::write(dest_path, content).unwrap(); } - - println!("cargo:rustc-env=PATH_SEPARATOR={}", path::MAIN_SEPARATOR); } diff --git a/cargo2android.json b/cargo2android.json index 2d87bb2..43dbcda 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,14 +1,13 @@ { "apex-available": [ "//apex_available:platform", - "com.android.bluetooth", "com.android.resolv", "com.android.virt" ], + "min_sdk_version": "29", "copy-out": true, "dependencies": true, "device": true, - "min-sdk-version": "29", "run": true, "tests": true -} +}
\ No newline at end of file diff --git a/out/count.rs b/out/count.rs index 4485b0c..41f84a9 100644 --- a/out/count.rs +++ b/out/count.rs @@ -67,8 +67,6 @@ macro_rules! count { (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!) => { proc_macro_call_63!() }; (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!) => { proc_macro_call_64!() }; ($(!)+) => { - compile_error! { - "this macro does not support >64 nested macro invocations" - } + compile_error! { "this macro does not support >64 nested macro invocations" } }; } diff --git a/patches/std_env.diff b/patches/std.diff index da99129..6d71af2 100644 --- a/patches/std_env.diff +++ b/patches/std.diff @@ -2,15 +2,13 @@ diff --git a/src/lib.rs b/src/lib.rs index 9ec6df0..0cd8302 100644 --- a/src/lib.rs +++ b/src/lib.rs -@@ -40,7 +40,10 @@ +@@ -40,6 +40,9 @@ #![no_std] +// ANDROID: Use std to allow building as a dylib. +extern crate std; + --include!(concat!(env!("OUT_DIR"), env!("PATH_SEPARATOR"), "count.rs")); -+include!(concat!(env!("OUT_DIR"), "/count.rs")); + include!(concat!(env!("OUT_DIR"), "/count.rs")); #[doc(hidden)] - #[macro_export] |