aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-10-20 15:00:13 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-10-20 15:00:13 -0700
commit04658a3c24e1f4b7e1142843bb0a33d55e4f821f (patch)
treef4d7b6d74a95b10dd8adfaf017c06ed590c61905
parent7b948cc7c5da776aad7f0008e2e108ffba961f37 (diff)
Change default value of protoc on xx_proto_library rules.
-rw-r--r--BUILD14
-rw-r--r--protobuf.bzl4
2 files changed, 14 insertions, 4 deletions
diff --git a/BUILD b/BUILD
index 281436a3..4ccf9a6e 100644
--- a/BUILD
+++ b/BUILD
@@ -18,8 +18,13 @@ COPTS = [
# Bazel should provide portable link_opts for pthread.
LINK_OPTS = ["-lpthread"]
-load("protobuf", "cc_proto_library", "py_proto_library", "copied_srcs",
- "internal_protobuf_py_tests")
+load(
+ "protobuf",
+ "cc_proto_library",
+ "py_proto_library",
+ "copied_srcs",
+ "internal_protobuf_py_tests",
+)
cc_library(
name = "protobuf_lite",
@@ -151,6 +156,7 @@ cc_proto_library(
include = "src",
cc_libs = [":protobuf"],
internal_bootstrap_hack = 1,
+ protoc = ":protoc",
)
################################################################################
@@ -327,6 +333,7 @@ cc_proto_library(
name = "cc_test_protos",
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
include = "src",
+ protoc = ":protoc",
deps = [":cc_wkt_protos"],
)
@@ -497,6 +504,7 @@ py_proto_library(
name = "python_proto",
srcs = WELL_KNOWN_PROTOS,
include = "src",
+ protoc = ":protoc",
py_extra_srcs = [":python_srcs"],
visibility = ["//visibility:public"],
)
@@ -516,6 +524,7 @@ py_proto_library(
name = "python_common_test_protos",
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
include = "src",
+ protoc = ":protoc",
deps = [":python_proto"],
)
@@ -523,6 +532,7 @@ py_proto_library(
name = "python_specific_test_protos",
srcs = glob(["python/google/protobuf/internal/*.proto"]),
include = "python",
+ protoc = ":protoc",
deps = [":python_common_test_protos"],
)
diff --git a/protobuf.bzl b/protobuf.bzl
index 27e88850..c7d66086 100644
--- a/protobuf.bzl
+++ b/protobuf.bzl
@@ -95,7 +95,7 @@ def cc_proto_library(
deps=[],
cc_libs=[],
include=None,
- protoc=":protoc",
+ protoc="//google/protobuf:protoc",
internal_bootstrap_hack=False,
**kargs):
"""Bazel rule to create a C++ protobuf library from proto source files
@@ -192,7 +192,7 @@ def py_proto_library(
py_libs=[],
py_extra_srcs=[],
include=None,
- protoc=":protoc",
+ protoc="//google/protobuf:protoc",
**kargs):
"""Bazel rule to create a Python protobuf library from proto source files