Browse Source

Blacklist all WELL_KNOWN_PROTOS from Bazel C++ code generation.

This prevents the Bazel `CcProtoAspect` from generating and linking
C++ object code for these files. Without this blacklist, symbols for
protobuf types depended on by `libprotobuf` may be defined multiple
times and violate the ODR rule.

Fixes https://github.com/google/protobuf/issues/4311
John Millikin 7 years ago
parent
commit
350b135e23
1 changed files with 1 additions and 0 deletions
  1. 1 0
      BUILD

+ 1 - 0
BUILD

@@ -843,6 +843,7 @@ proto_lang_toolchain(
     command_line = "--cpp_out=$(OUT)",
     runtime = ":protobuf",
     visibility = ["//visibility:public"],
+    blacklisted_protos = [":_internal_wkt_protos_genrule"],
 )
 
 proto_lang_toolchain(