summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYecheng Zhao <zyecheng@google.com>2023-10-10 18:22:39 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-10 18:22:39 +0000
commit51e74a047b838e8495956875bd664cee4af81202 (patch)
tree6465b0b4f732e2b574f503bd77b0e1f6c67988b5
parent44e964104d85d86570a4031c6aa4978a2214d23b (diff)
parent07c4969d3c595babd9b66ef61f0dfa8bd0131b04 (diff)
downloadzerocopy-derive-51e74a047b838e8495956875bd664cee4af81202.tar.gz
Add BUILD file for zerocopy-derive kleaf build am: ed92e3395a am: 07c4969d3c
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/zerocopy-derive/+/2780057 Change-Id: Ifdd2ff94ed32904724c957fab135d2621a293858 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",
+ ],
+)