aboutsummaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@google.com>2016-12-20 09:08:19 -0800
committerAdam Cozzette <acozzette@google.com>2016-12-20 09:08:19 -0800
commitd1e7bd98428a321eab793f3dd099392dd364d9cd (patch)
tree7bd4b8b94d7e937e94385f1d0a71b5470fce3b51 /BUILD
parentcdc2766a5d9f64e9ef8af4aa481f1bb0b30bd700 (diff)
downloadprotobuf-d1e7bd98428a321eab793f3dd099392dd364d9cd.tar.gz
protobuf-d1e7bd98428a321eab793f3dd099392dd364d9cd.tar.bz2
protobuf-d1e7bd98428a321eab793f3dd099392dd364d9cd.zip
Added Bazel genrule for generating well_known_types_embed.cc
In pull request #2517 I made this change for the CMake and autotools builds but forgot to do it for the Bazel build.
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD18
1 files changed, 18 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index c9f40321..cf5f0a87 100644
--- a/BUILD
+++ b/BUILD
@@ -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 = [