aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYecheng Zhao <zyecheng@google.com>2023-10-10 18:19:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-10 18:19:07 +0000
commite5e63bd52b17410c79666ab9a406924a36d1db7a (patch)
tree911a0e79c7d16c43e575ba5b166a8027b9b3a8a8
parent20368b48fd241f27235087c90f993e4a8abb0570 (diff)
parent9dc6c189033f4a24408ba0f4ca5d5000eaabe1eb (diff)
downloadsyn-e5e63bd52b17410c79666ab9a406924a36d1db7a.tar.gz
Add BUILD file for crate syn kleaf build am: da9ba1e639 am: 9dc6c18903
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/syn/+/2779471 Change-Id: Ibf7a5ad6a44d9437a00124399acdcb4e82f447cd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--BUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/BUILD b/BUILD
new file mode 100644
index 00000000..93e54c74
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,59 @@
+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 = "syn",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ "clone-impls",
+ "default",
+ "derive",
+ "extra-traits",
+ "full",
+ "parsing",
+ "printing",
+ "proc-macro",
+ "quote",
+ "visit",
+ "visit-mut",
+ ],
+ edition = "2021",
+ 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/unicode-ident".
+ "@unicode-ident",
+ ],
+)