aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYecheng Zhao <zyecheng@google.com>2023-10-09 22:48:06 +0000
committerYecheng Zhao <zyecheng@google.com>2023-10-09 22:48:06 +0000
commitbbad5e4de6fe80994b4a404cd3cc0ab45a04de61 (patch)
tree5c27db1e046ee724171ce26a3c91ee2806ba84c6
parentd076a8b19b5f612c30bb7597f1b4b089f9e38929 (diff)
downloadquote-bbad5e4de6fe80994b4a404cd3cc0ab45a04de61.tar.gz
Add BUILD file for crate quote kleaf build
Test: touch external/rust/crates/unicode-ident/WORKSPACE && \ touch external/rust/crates/proc-macro2/WORKSPACE && \ touch external/rust/crates/quote/WORKSPACE && \ b build @quote \ --override_repository=unicode-ident=external/rust/crates/unicode-ident/ \ --override_repository=proc-macro2=external/rust/crates/proc-macro2/ \ --override_repository=quote=external/rust/crates/quote/ Bug: 304282799 Change-Id: Id29d2a6b24cff948ae64816f2d311494072a137b
-rw-r--r--BUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..d02d8cb
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,45 @@
+load("@rules_license//rules:license.bzl", "license")
+load("@rules_license//rules:license_kind.bzl", "license_kind")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+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_library(
+ name = "quote",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ "default",
+ "proc-macro",
+ ],
+ edition = "2018",
+ deps = [
+ # This should map to repo checked out from Android third party project
+ # "platform/external/rust/crates/proc-macro2".
+ "@proc-macro2",
+ ],
+)