diff options
author | Yecheng Zhao <zyecheng@google.com> | 2023-10-09 23:33:28 +0000 |
---|---|---|
committer | Yecheng Zhao <zyecheng@google.com> | 2023-10-09 23:33:28 +0000 |
commit | c118b3d2e7b9cbdad5ce91da4e3b2dc2b7945c74 (patch) | |
tree | 67879ce0ffa295f39cef584ef450e6f20335bc49 | |
parent | 443be155c406c1f0c4e8e801e135f3f3156bc747 (diff) | |
download | cfg-if-c118b3d2e7b9cbdad5ce91da4e3b2dc2b7945c74.tar.gz |
Add BUILD file for cfg-if kleaf build
Test:
touch external/rust/crates/cfg-if/WORKSPACE && \
b build @cfg-if \
--override_repository=cfg-if=external/rust/crates/cfg-if/
Bug: 304282799
Change-Id: I002448983c275d219be92c87ef8870258d406789
-rw-r--r-- | BUILD | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -0,0 +1,36 @@ +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 = "cfg-if", + srcs = glob(["**/*.rs"]), + edition = "2018", +) |