From f73c7cb74a53a39f7473dee168770f3e5782e15f Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 21 Mar 2023 13:47:37 -0700 Subject: [PATCH] Add license rules PiperOrigin-RevId: 518370510 --- rust/BUILD | 5 ++++- rust/cpp_kernel/BUILD | 2 ++ rust/test/BUILD | 2 ++ rust/test/rust_proto_library_unit_test/BUILD | 2 ++ rust/upb_kernel/BUILD | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rust/BUILD b/rust/BUILD index 230d1c6fde..ed20894476 100644 --- a/rust/BUILD +++ b/rust/BUILD @@ -5,7 +5,10 @@ load("//third_party/bazel_skylib/rules:common_settings.bzl", "string_flag") load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain") -package(default_visibility = ["//src/google/protobuf:__subpackages__"]) +package( + default_applicable_licenses = ["//third_party/protobuf:license"], + default_visibility = ["//src/google/protobuf:__subpackages__"], +) rust_library( name = "protobuf", diff --git a/rust/cpp_kernel/BUILD b/rust/cpp_kernel/BUILD index 415bd96f50..c5536f3c0c 100644 --- a/rust/cpp_kernel/BUILD +++ b/rust/cpp_kernel/BUILD @@ -2,6 +2,8 @@ load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") +package(default_applicable_licenses = ["//third_party/protobuf:license"]) + rust_library( name = "cpp", srcs = ["cpp.rs"], diff --git a/rust/test/BUILD b/rust/test/BUILD index 9298b3bc32..c8c8c3baba 100644 --- a/rust/test/BUILD +++ b/rust/test/BUILD @@ -1,6 +1,8 @@ load("//rust:defs.bzl", "rust_proto_library") load("@rules_rust//rust:defs.bzl", "rust_test") +package(default_applicable_licenses = ["//third_party/protobuf:license"]) + rust_proto_library( name = "unittest_rust_proto", testonly = True, diff --git a/rust/test/rust_proto_library_unit_test/BUILD b/rust/test/rust_proto_library_unit_test/BUILD index de7da619e3..23348f7a3c 100644 --- a/rust/test/rust_proto_library_unit_test/BUILD +++ b/rust/test/rust_proto_library_unit_test/BUILD @@ -1,3 +1,5 @@ load(":rust_proto_library_unit_test.bzl", "rust_proto_library_unit_test") +package(default_applicable_licenses = ["//third_party/protobuf:license"]) + rust_proto_library_unit_test(name = "rust_proto_library_unit_test") diff --git a/rust/upb_kernel/BUILD b/rust/upb_kernel/BUILD index d51328b13a..81b2fb994c 100644 --- a/rust/upb_kernel/BUILD +++ b/rust/upb_kernel/BUILD @@ -2,6 +2,8 @@ load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") +package(default_applicable_licenses = ["//third_party/protobuf:license"]) + rust_library( name = "upb", srcs = ["upb.rs"],