diff options
author | Yecheng Zhao <zyecheng@google.com> | 2023-10-10 19:34:52 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-10-10 19:34:52 +0000 |
commit | dec947b314353b7e0447f002ab1a19c614942eec (patch) | |
tree | e2d80a78b17bdf0c3cd9a9a106157793ddd26cc2 | |
parent | cc0087fc819c5a23a056d09dbcbc923ffc2967b1 (diff) | |
parent | 91c2cad75cada07943032e5822e1653afb8e5d38 (diff) | |
download | proc-macro2-dec947b314353b7e0447f002ab1a19c614942eec.tar.gz |
Add BUILD file for proc-macro2 kleaf build am: d3a23639db am: 385582dfb5 am: 049d27e45c am: 91c2cad75c
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/proc-macro2/+/2779911
Change-Id: Ia8376bb3ff191734c41612f84864150a54035f9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | BUILD | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -0,0 +1,59 @@ +load("@rules_license//rules:license.bzl", "license") +load("@rules_license//rules:license_kind.bzl", "license_kind") +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +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 = "", +) + +CRATE_FEATURES = [ + "default", + "proc-macro", + "span-locations", +] + +rust_library( + name = "proc-macro2", + srcs = glob(["**/*.rs"]), + crate_features = CRATE_FEATURES, + edition = "2021", + deps = [ + ":proc-macro2_build_script", + # This should map to repo checked out from Android third party project + # "platform/external/rust/crates/unicode-ident". + "@unicode-ident", + ], +) + +cargo_build_script( + name = "proc-macro2_build_script", + srcs = glob(["**/*.rs"]), + crate_features = CRATE_FEATURES, + crate_root = "build.rs", + edition = "2021", + visibility = ["//visibility:private"], +) |