diff options
author | Yecheng Zhao <zyecheng@google.com> | 2023-10-09 23:37:03 +0000 |
---|---|---|
committer | Yecheng Zhao <zyecheng@google.com> | 2023-10-09 23:41:06 +0000 |
commit | 591d7f67ab151975baf14ba4a196a19e2c7591a7 (patch) | |
tree | 8cccda6f26f513ba45203e7d1937521771f31dbd | |
parent | 903ae1d64f944f3ce5e13355a2c94b1c0ebdbdc8 (diff) | |
download | crc32fast-591d7f67ab151975baf14ba4a196a19e2c7591a7.tar.gz |
Add BUILD file for crc32fast kleaf build
Test:
touch external/rust/crates/crc32fast/WORKSPACE && \
touch external/rust/crates/cfg-if/WORKSPACE && \
b build @crc32fast \
--override_repository=crc32fast=external/rust/crates/crc32fast/ \
--override_repository=cfg-if=external/rust/crates/cfg-if/
Bug: 304282799
Change-Id: Iddb07edb9a7ca2d0a99aaec4a3d2d3542d921b2d
-rw-r--r-- | BUILD | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -0,0 +1,41 @@ +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 = "crc32fast", + srcs = glob(["**/*.rs"]), + edition = "2015", + deps = [ + # This should map to repo checked out from Android third party project + # "platform/external/rust/crates/cfg-if". + "@cfg-if" + ], +) |