Skip to content

Commit

Permalink
Added Bazel genrule for generating well_known_types_embed.cc
Browse files Browse the repository at this point in the history
In pull request protocolbuffers#2517 I made this change for the CMake and autotools
builds but forgot to do it for the Bazel build.
  • Loading branch information
acozzette committed Dec 20, 2016
1 parent cdc2766 commit d1e7bd9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,24 @@ cc_proto_library(
# Protocol Buffers Compiler
################################################################################

cc_binary(
name = "js_embed",
srcs = ["src/google/protobuf/compiler/js/embed.cc"],
visibility = ["//visibility:public"],
)

genrule(
name = "generate_js_well_known_types_embed",
srcs = [
"src/google/protobuf/compiler/js/well_known_types/any.js",
"src/google/protobuf/compiler/js/well_known_types/struct.js",
"src/google/protobuf/compiler/js/well_known_types/timestamp.js",
],
outs = ["src/google/protobuf/compiler/js/well_known_types_embed.cc"],
cmd = "$(location :js_embed) $(SRCS) > $@",
tools = [":js_embed"],
)

cc_library(
name = "protoc_lib",
srcs = [
Expand Down

0 comments on commit d1e7bd9

Please sign in to comment.