diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-10 23:11:29 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-10 23:11:29 +0000 |
commit | 756e0f3f265fdfe79908bde25a042a487ee6cf55 (patch) | |
tree | e2d80a78b17bdf0c3cd9a9a106157793ddd26cc2 | |
parent | 31cbb3b401ebd04dc530c3e09a01378972b06252 (diff) | |
parent | d3a23639db2b5ef4f45a9619a3cb1d26a8a7ac76 (diff) | |
download | proc-macro2-756e0f3f265fdfe79908bde25a042a487ee6cf55.tar.gz |
Snap for 10929834 from d3a23639db2b5ef4f45a9619a3cb1d26a8a7ac76 to sdk-release
Change-Id: I87f3399940792d47401e9668ccb3f495dcea7210
-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"], +) |