summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:22:22 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:22:22 +0000
commit32a25b21b266defa6e7ce732557bcd65c53ce5ee (patch)
tree7fe83959c592e8f5ad66e632a2e74f03719b899b
parentcb7d3504eb32cbb9d94e210d71064ffd3a139e2a (diff)
parent22216534944c6f96a2c997ddbab70d16379e6f42 (diff)
downloadproc-macro-nested-android13-mainline-os-statsd-release.tar.gz
Change-Id: If3023194752e8a3fef107a7001be63335996ee02
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp28
-rw-r--r--Cargo.toml2
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA10
-rw-r--r--TEST_MAPPING11
-rw-r--r--build.rs8
-rw-r--r--cargo2android.json5
-rw-r--r--out/count.rs4
-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"
}
}
diff --git a/Android.bp b/Android.bp
index 68b8394..d118e70 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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"],
-}
diff --git a/Cargo.toml b/Cargo.toml
index 0e57e36..f768689 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/METADATA b/METADATA
index 67d5c26..478b925 100644
--- a/METADATA
+++ b/METADATA
@@ -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"
- }
- ]
-}
diff --git a/build.rs b/build.rs
index ef56f8e..01dbc0d 100644
--- a/build.rs
+++ b/build.rs
@@ -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]