summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYecheng Zhao <zyecheng@google.com>2023-10-10 21:16:47 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-10 21:16:47 +0000
commitf7ec26f76c0eda5a04e7820029a8e3aeb0172e2b (patch)
tree6465b0b4f732e2b574f503bd77b0e1f6c67988b5
parent1231b6cf1d9e41d08d622ffeab6e345ba2dd46ef (diff)
parent0b1edfe2a982969738b9d6ffb5e7215f83558b82 (diff)
downloadzerocopy-derive-f7ec26f76c0eda5a04e7820029a8e3aeb0172e2b.tar.gz
Add BUILD file for zerocopy-derive kleaf build am: ed92e3395a am: 07c4969d3c am: 51e74a047b am: eba116b020 am: 0b1edfe2a9
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/zerocopy-derive/+/2780057 Change-Id: Idfbe1dd8f72210d8d71c394d2edc9c44b0d37692 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--BUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..b05c589
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,46 @@
+load("@rules_license//rules:license.bzl", "license")
+load("@rules_license//rules:license_kind.bzl", "license_kind")
+load("@rules_rust//rust:defs.bzl", "rust_proc_macro")
+
+package(
+ default_applicable_licenses = [":license"],
+ default_visibility = ["//visibility:public"],
+)
+
+license(
+ name = "license",
+ license_kinds = [
+ ":SPDX-license-identifier-Apache-2.0",
+ ":SPDX-license-identifier-MIT",
+ ],
+ license_text = "LICENSE-APACHE",
+ visibility = [":__subpackages__"],
+)
+
+license_kind(
+ name = "SPDX-license-identifier-Apache-2.0",
+ conditions = ["notice"],
+ url = "https://spdx.org/licenses/Apache-2.0.html",
+)
+
+license_kind(
+ name = "SPDX-license-identifier-MIT",
+ conditions = ["notice"],
+ url = "",
+)
+
+rust_proc_macro(
+ name = "zerocopy-derive",
+ srcs = glob(["**/*.rs"]),
+ edition = "2018",
+ deps = [
+ # This should map to repo checked out from Android third party project
+ # "platform/external/rust/crates/proc-macro2". Similar for the rest of the dependencies
+ # below.
+ "@proc-macro2",
+ # Map to project repo "platform/external/rust/crates/quote".
+ "@quote",
+ # Map to project repo "platform/external/rust/crates/syn".
+ "@syn",
+ ],
+)