Skip to content

Commit

Permalink
Update BUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannic authored Jan 9, 2020
1 parent d5eba10 commit 51000fe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library")
load("@rules_java//java:defs.bzl", "java_library")
load("@rules_proto//proto:defs.bzl", "proto_common", "proto_lang_toolchain", "proto_library")
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library")
load("@rules_proto//proto/private:native.bzl", "native_proto_common")
load("@rules_python//python:defs.bzl", "py_library")

licenses(["notice"])
Expand Down Expand Up @@ -986,7 +987,9 @@ cc_library(
],
)

reject_blacklisted_files = not hasattr(proto_common, "proto_lang_toolchain_rejects_files_do_not_use_or_we_will_break_you_without_mercy")
# Note: We use `native_proto_common` here because we depend on an implementation-detail of
# `proto_lang_toolchain`, which may not be available on `proto_common`.
reject_blacklisted_files = not hasattr(native_proto_common, "proto_lang_toolchain_rejects_files_do_not_use_or_we_will_break_you_without_mercy")
cc_toolchain_blacklisted_protos = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()] if reject_blacklisted_files else [":well_known_protos"]
proto_lang_toolchain(
name = "cc_toolchain",
Expand Down

0 comments on commit 51000fe

Please sign in to comment.