diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 07:23:39 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 07:23:39 +0000 |
commit | a66e9747cb3db787034160b62d19ef0e69c7423b (patch) | |
tree | 7fe83959c592e8f5ad66e632a2e74f03719b899b | |
parent | 719f800bbdd7d1530fcbd1261a4b1332c20ed457 (diff) | |
parent | 22216534944c6f96a2c997ddbab70d16379e6f42 (diff) | |
download | proc-macro-nested-android13-mainline-art-release.tar.gz |
Snap for 8564071 from 22216534944c6f96a2c997ddbab70d16379e6f42 to mainline-art-releaseaml_art_331813100aml_art_331813010aml_art_331711080aml_art_331612010aml_art_331413030aml_art_331314010aml_art_331113000aml_art_331012050android13-mainline-art-release
Change-Id: I7743c73cf2921cd27e7e51dcaf5cedf62d26a4f5
-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_env.diff (renamed from patches/std.diff) | 6 |
10 files changed, 27 insertions, 51 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index f40cd7e..80f1df4 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "8a3cec3cfc7b8417ef8cc2970f7de27ff2b6a023" + "sha1": "0d6c7a078176d77e3fc8911c00bf4bb06d3ba9bd" } } @@ -50,6 +50,8 @@ 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", @@ -57,33 +59,9 @@ 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.6" +version = "0.1.7" 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 fd0fa99..aa306db 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "proc-macro-nested" -version = "0.1.6" +version = "0.1.7" 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.6.crate" + value: "https://static.crates.io/crates/proc-macro-nested/proc-macro-nested-0.1.7.crate" } - version: "0.1.6" + version: "0.1.7" license_type: NOTICE last_upgrade_date { - year: 2020 - month: 7 - day: 10 + year: 2021 + month: 6 + day: 16 } } diff --git a/TEST_MAPPING b/TEST_MAPPING deleted file mode 100644 index 0cba459..0000000 --- a/TEST_MAPPING +++ /dev/null @@ -1,11 +0,0 @@ -// 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::Path; +use std::path::{self, Path}; /* #[doc(hidden)] @@ -27,7 +27,9 @@ fn main() { content += &format!(" ({}) => {{ proc_macro_call_{}!() }};\n", bangs, i); } content += " ($(!)+) => {\n"; - content += " compile_error! { \"this macro does not support >64 nested macro invocations\" }\n"; + content += " compile_error! {\n"; + content += " \"this macro does not support >64 nested macro invocations\"\n"; + content += " }\n"; content += " };\n"; content += "}\n"; @@ -43,4 +45,6 @@ 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 43dbcda..2d87bb2 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,13 +1,14 @@ { "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 41f84a9..4485b0c 100644 --- a/out/count.rs +++ b/out/count.rs @@ -67,6 +67,8 @@ 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.diff b/patches/std_env.diff index 6d71af2..da99129 100644 --- a/patches/std.diff +++ b/patches/std_env.diff @@ -2,13 +2,15 @@ diff --git a/src/lib.rs b/src/lib.rs index 9ec6df0..0cd8302 100644 --- a/src/lib.rs +++ b/src/lib.rs -@@ -40,6 +40,9 @@ +@@ -40,7 +40,10 @@ #![no_std] +// ANDROID: Use std to allow building as a dylib. +extern crate std; + - include!(concat!(env!("OUT_DIR"), "/count.rs")); +-include!(concat!(env!("OUT_DIR"), env!("PATH_SEPARATOR"), "count.rs")); ++include!(concat!(env!("OUT_DIR"), "/count.rs")); #[doc(hidden)] + #[macro_export] |